wok diff apache/receipt @ rev 1392
Up: nano 2.0.9
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Sep 17 23:54:59 2008 +0200 (2008-09-17) |
parents | |
children | 295bc93ddcc2 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/apache/receipt Wed Sep 17 23:54:59 2008 +0200 1.3 @@ -0,0 +1,71 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="apache" 1.7 +VERSION="2.2.9" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Secure, efficient and extensible HTTP server." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +SOURCE="httpd" 1.12 +TARBALL="$SOURCE-$VERSION.tar.bz2" 1.13 +WEB_SITE="http://www.apache.org/" 1.14 +WGET_URL="${WEB_SITE}dist/$SOURCE/$TARBALL" 1.15 +DEPENDS="apr-util apr" 1.16 +BUILD_DEPENDS="apr-util-dev apr-dev" 1.17 +CONFIG_FILES="/etc/apache /var/www" 1.18 + 1.19 +# Rules to configure and make the package. 1.20 +compile_rules() 1.21 +{ 1.22 + ln -s $SOURCE-$VERSION $PACKAGE-$VERSION 1.23 + cd $src 1.24 + grep -q Slitaz config.layout || \ 1.25 + cat ../stuff/slitaz.layout >> config.layout 1.26 + ./configure --mandir=/usr/share/man --enable-mods-shared=all \ 1.27 + --enable-layout=Slitaz $CONFIGURE_ARGS && \ 1.28 + make && make DESTDIR=$PWD/_pkg install 1.29 +} 1.30 + 1.31 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.32 +genpkg_rules() 1.33 +{ 1.34 + mkdir -p $fs/usr/share/apache $fs/etc/init.d $fs/etc/apache/conf.d 1.35 + cp -a $_pkg/usr/share/apache/icons $fs/usr/share/apache 1.36 + cp -a $_pkg/usr/share/apache/error $fs/usr/share/apache 1.37 + cp -a $_pkg/usr/share/apache/modules $fs/usr/share/apache 1.38 + cp -a $_pkg/usr/bin $fs/usr 1.39 + rm -r $fs/usr/bin/apxs 1.40 + cp -a $_pkg/etc $fs 1.41 + cp -a $_pkg/var $fs 1.42 + ln -s /usr/bin/apachectl $fs/etc/init.d/apache 1.43 + sed -i -e 's|User daemon|User www|' -e 's|Group daemon|Group www|' \ 1.44 + -e 's|ServerAdmin you@example.com|ServerAdmin root@localhost|' \ 1.45 + $fs/etc/apache/httpd.conf 1.46 + echo "Include /etc/apache/conf.d" >> $fs/etc/apache/httpd.conf 1.47 + # Cook all packages based on apache 1.48 + for i in $(cd $WOK; ls -d apache-*) 1.49 + do 1.50 + tazwok genpkg $i 1.51 + done 1.52 +} 1.53 + 1.54 +# Pre and post install commands for Tazpkg. 1.55 +# We stop the server by default in case of upgarde. 1.56 +pre_install() 1.57 +{ 1.58 + echo "Processing pre-install commands..." 1.59 + [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop 1.60 +} 1.61 + 1.62 +post_install() 1.63 +{ 1.64 + echo "Processing post-install commands..." 1.65 + # Just in case. 1.66 + chown www.www $1/var/log/$PACKAGE 1.67 + /etc/init.d/$PACKAGE start 1.68 +} 1.69 + 1.70 +# Rules to clean extras dirs or files 1.71 +clean_wok() 1.72 +{ 1.73 + rm -rf $WOK/$PACKAGE/${PACKAGE}.${VERSION} 1.74 +}