wok annotate apache/receipt @ rev 1423
Fix CATEGORY in receipts
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 26 09:21:16 2008 +0000 (2008-09-26) |
parents | |
children | 295bc93ddcc2 |
rev | line source |
---|---|
pascal@1313 | 1 # SliTaz package receipt. |
pascal@1313 | 2 |
pascal@1313 | 3 PACKAGE="apache" |
pascal@1313 | 4 VERSION="2.2.9" |
pascal@1313 | 5 CATEGORY="network" |
pascal@1313 | 6 SHORT_DESC="Secure, efficient and extensible HTTP server." |
pascal@1313 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1313 | 8 SOURCE="httpd" |
pascal@1313 | 9 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@1313 | 10 WEB_SITE="http://www.apache.org/" |
pascal@1313 | 11 WGET_URL="${WEB_SITE}dist/$SOURCE/$TARBALL" |
pascal@1313 | 12 DEPENDS="apr-util apr" |
pascal@1313 | 13 BUILD_DEPENDS="apr-util-dev apr-dev" |
pascal@1313 | 14 CONFIG_FILES="/etc/apache /var/www" |
pascal@1313 | 15 |
pascal@1313 | 16 # Rules to configure and make the package. |
pascal@1313 | 17 compile_rules() |
pascal@1313 | 18 { |
pascal@1313 | 19 ln -s $SOURCE-$VERSION $PACKAGE-$VERSION |
pascal@1313 | 20 cd $src |
pascal@1313 | 21 grep -q Slitaz config.layout || \ |
pascal@1313 | 22 cat ../stuff/slitaz.layout >> config.layout |
pascal@1313 | 23 ./configure --mandir=/usr/share/man --enable-mods-shared=all \ |
pascal@1313 | 24 --enable-layout=Slitaz $CONFIGURE_ARGS && \ |
pascal@1313 | 25 make && make DESTDIR=$PWD/_pkg install |
pascal@1313 | 26 } |
pascal@1313 | 27 |
pascal@1313 | 28 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1313 | 29 genpkg_rules() |
pascal@1313 | 30 { |
pascal@1313 | 31 mkdir -p $fs/usr/share/apache $fs/etc/init.d $fs/etc/apache/conf.d |
pascal@1313 | 32 cp -a $_pkg/usr/share/apache/icons $fs/usr/share/apache |
pascal@1313 | 33 cp -a $_pkg/usr/share/apache/error $fs/usr/share/apache |
pascal@1313 | 34 cp -a $_pkg/usr/share/apache/modules $fs/usr/share/apache |
pascal@1313 | 35 cp -a $_pkg/usr/bin $fs/usr |
pascal@1313 | 36 rm -r $fs/usr/bin/apxs |
pascal@1313 | 37 cp -a $_pkg/etc $fs |
pascal@1313 | 38 cp -a $_pkg/var $fs |
pascal@1313 | 39 ln -s /usr/bin/apachectl $fs/etc/init.d/apache |
pascal@1313 | 40 sed -i -e 's|User daemon|User www|' -e 's|Group daemon|Group www|' \ |
pascal@1313 | 41 -e 's|ServerAdmin you@example.com|ServerAdmin root@localhost|' \ |
pascal@1313 | 42 $fs/etc/apache/httpd.conf |
pascal@1313 | 43 echo "Include /etc/apache/conf.d" >> $fs/etc/apache/httpd.conf |
pascal@1313 | 44 # Cook all packages based on apache |
pascal@1313 | 45 for i in $(cd $WOK; ls -d apache-*) |
pascal@1313 | 46 do |
pascal@1313 | 47 tazwok genpkg $i |
pascal@1313 | 48 done |
pascal@1313 | 49 } |
pascal@1313 | 50 |
pascal@1313 | 51 # Pre and post install commands for Tazpkg. |
pascal@1313 | 52 # We stop the server by default in case of upgarde. |
pascal@1313 | 53 pre_install() |
pascal@1313 | 54 { |
pascal@1313 | 55 echo "Processing pre-install commands..." |
pascal@1313 | 56 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pascal@1313 | 57 } |
pascal@1313 | 58 |
pascal@1313 | 59 post_install() |
pascal@1313 | 60 { |
pascal@1313 | 61 echo "Processing post-install commands..." |
pascal@1313 | 62 # Just in case. |
pascal@1313 | 63 chown www.www $1/var/log/$PACKAGE |
pascal@1313 | 64 /etc/init.d/$PACKAGE start |
pascal@1313 | 65 } |
pascal@1313 | 66 |
pascal@1313 | 67 # Rules to clean extras dirs or files |
pascal@1313 | 68 clean_wok() |
pascal@1313 | 69 { |
pascal@1313 | 70 rm -rf $WOK/$PACKAGE/${PACKAGE}.${VERSION} |
pascal@1313 | 71 } |