wok annotate apache/receipt @ rev 1786
Apache: add modules proxy & ssl
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 30 13:08:33 2008 +0000 (2008-11-30) |
parents | ea5bbe74dfcd |
children | cd99364b9f32 |
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@1786 | 12 DEPENDS="apr-util apr openssl" |
pascal@1786 | 13 BUILD_DEPENDS="apr-util-dev apr-dev openssl-dev" |
pascal@1313 | 14 CONFIG_FILES="/etc/apache /var/www" |
pascal@1572 | 15 PROVIDE="lighttpd" |
pascal@1313 | 16 |
pascal@1313 | 17 # Rules to configure and make the package. |
pascal@1313 | 18 compile_rules() |
pascal@1313 | 19 { |
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@1786 | 24 --enable-proxy --enable-ssl \ |
pascal@1658 | 25 --enable-layout=Slitaz $CONFIGURE_ARGS && |
pascal@1313 | 26 make && make DESTDIR=$PWD/_pkg install |
pascal@1313 | 27 } |
pascal@1313 | 28 |
pascal@1313 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1313 | 30 genpkg_rules() |
pascal@1313 | 31 { |
pascal@1313 | 32 mkdir -p $fs/usr/share/apache $fs/etc/init.d $fs/etc/apache/conf.d |
pascal@1313 | 33 cp -a $_pkg/usr/share/apache/icons $fs/usr/share/apache |
pascal@1313 | 34 cp -a $_pkg/usr/share/apache/error $fs/usr/share/apache |
pascal@1313 | 35 cp -a $_pkg/usr/share/apache/modules $fs/usr/share/apache |
pascal@1313 | 36 cp -a $_pkg/usr/bin $fs/usr |
pascal@1313 | 37 rm -r $fs/usr/bin/apxs |
pascal@1313 | 38 cp -a $_pkg/etc $fs |
pascal@1786 | 39 rm -rf $fs/etc/apache/original |
pascal@1313 | 40 cp -a $_pkg/var $fs |
pascal@1313 | 41 ln -s /usr/bin/apachectl $fs/etc/init.d/apache |
pascal@1313 | 42 sed -i -e 's|User daemon|User www|' -e 's|Group daemon|Group www|' \ |
pascal@1313 | 43 -e 's|ServerAdmin you@example.com|ServerAdmin root@localhost|' \ |
pascal@1313 | 44 $fs/etc/apache/httpd.conf |
pascal@1313 | 45 echo "Include /etc/apache/conf.d" >> $fs/etc/apache/httpd.conf |
pascal@1313 | 46 # Cook all packages based on apache |
pascal@1313 | 47 for i in $(cd $WOK; ls -d apache-*) |
pascal@1313 | 48 do |
pascal@1313 | 49 tazwok genpkg $i |
pascal@1313 | 50 done |
pascal@1313 | 51 } |
pascal@1313 | 52 |
pascal@1313 | 53 # Pre and post install commands for Tazpkg. |
pascal@1313 | 54 # We stop the server by default in case of upgarde. |
pascal@1313 | 55 pre_install() |
pascal@1313 | 56 { |
pascal@1313 | 57 echo "Processing pre-install commands..." |
pascal@1313 | 58 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pascal@1313 | 59 } |
pascal@1313 | 60 |
pascal@1313 | 61 post_install() |
pascal@1313 | 62 { |
pascal@1313 | 63 echo "Processing post-install commands..." |
pascal@1313 | 64 # Just in case. |
pascal@1313 | 65 chown www.www $1/var/log/$PACKAGE |
pascal@1658 | 66 ping -c 2 $(hostname) > /dev/null 2>&1 || |
pascal@1658 | 67 sed -i "s/localhost/$(hostname) localhost/" /etc/hosts |
pascal@1313 | 68 /etc/init.d/$PACKAGE start |
pascal@1313 | 69 } |
pascal@1313 | 70 |
pascal@1313 | 71 # Rules to clean extras dirs or files |
pascal@1313 | 72 clean_wok() |
pascal@1313 | 73 { |
pascal@1313 | 74 rm -rf $WOK/$PACKAGE/${PACKAGE}.${VERSION} |
pascal@1313 | 75 } |