# HG changeset patch # User Pascal Bellard # Date 1219862204 0 # Node ID c74cae4e8a62c3bb26dbf45e45e8a8b53ba7967a # Parent 71ef79e50038575d0a51fc1ca05077fd7f210def Add apache diff -r 71ef79e50038 -r c74cae4e8a62 apache-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache-dev/receipt Wed Aug 27 18:36:44 2008 +0000 @@ -0,0 +1,19 @@ +# SliTaz package receipt. + +PACKAGE="apache-dev" +VERSION="2.2.9" +CATEGORY="development" +SHORT_DESC="HTTP server development files." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.apache.org/" +WANTED="apache" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/apache $fs/usr/bin + cp -a $_pkg/usr/include $fs/usr + cp -a $_pkg/usr/bin/apxs $fs/usr/bin + cp -a $_pkg/usr/share/apache/build $fs/usr/share/apache +} + diff -r 71ef79e50038 -r c74cae4e8a62 apache-doc/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache-doc/receipt Wed Aug 27 18:36:44 2008 +0000 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="apache-doc" +VERSION="2.2.9" +CATEGORY="development" +SHORT_DESC="HTTP server documentation files." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.apache.org/" +WANTED="apache" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share + cp -a $_pkg/usr/share/doc $fs/usr/share +} + diff -r 71ef79e50038 -r c74cae4e8a62 apache/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache/receipt Wed Aug 27 18:36:44 2008 +0000 @@ -0,0 +1,71 @@ +# SliTaz package receipt. + +PACKAGE="apache" +VERSION="2.2.9" +CATEGORY="network" +SHORT_DESC="Secure, efficient and extensible HTTP server." +MAINTAINER="pascal.bellard@slitaz.org" +SOURCE="httpd" +TARBALL="$SOURCE-$VERSION.tar.bz2" +WEB_SITE="http://www.apache.org/" +WGET_URL="${WEB_SITE}dist/$SOURCE/$TARBALL" +DEPENDS="apr-util apr" +BUILD_DEPENDS="apr-util-dev apr-dev" +CONFIG_FILES="/etc/apache /var/www" + +# Rules to configure and make the package. +compile_rules() +{ + ln -s $SOURCE-$VERSION $PACKAGE-$VERSION + cd $src + grep -q Slitaz config.layout || \ + cat ../stuff/slitaz.layout >> config.layout + ./configure --mandir=/usr/share/man --enable-mods-shared=all \ + --enable-layout=Slitaz $CONFIGURE_ARGS && \ + make && make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/apache $fs/etc/init.d $fs/etc/apache/conf.d + cp -a $_pkg/usr/share/apache/icons $fs/usr/share/apache + cp -a $_pkg/usr/share/apache/error $fs/usr/share/apache + cp -a $_pkg/usr/share/apache/modules $fs/usr/share/apache + cp -a $_pkg/usr/bin $fs/usr + rm -r $fs/usr/bin/apxs + cp -a $_pkg/etc $fs + cp -a $_pkg/var $fs + ln -s /usr/bin/apachectl $fs/etc/init.d/apache + sed -i -e 's|User daemon|User www|' -e 's|Group daemon|Group www|' \ + -e 's|ServerAdmin you@example.com|ServerAdmin root@localhost|' \ + $fs/etc/apache/httpd.conf + echo "Include /etc/apache/conf.d" >> $fs/etc/apache/httpd.conf + # Cook all packages based on apache + for i in $(cd $WOK; ls -d apache-*) + do + tazwok genpkg $i + done +} + +# Pre and post install commands for Tazpkg. +# We stop the server by default in case of upgarde. +pre_install() +{ + echo "Processing pre-install commands..." + [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop +} + +post_install() +{ + echo "Processing post-install commands..." + # Just in case. + chown www.www $1/var/log/$PACKAGE + /etc/init.d/$PACKAGE start +} + +# Rules to clean extras dirs or files +clean_wok() +{ + rm -rf $WOK/$PACKAGE/${PACKAGE}.${VERSION} +} diff -r 71ef79e50038 -r c74cae4e8a62 apache/stuff/slitaz.layout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache/stuff/slitaz.layout Wed Aug 27 18:36:44 2008 +0000 @@ -0,0 +1,22 @@ + + + prefix: /usr + exec_prefix: /usr + bindir: /usr/bin + sbindir: /usr/bin + libdir: /usr/lib + libexecdir: /usr/share/apache/modules + sysconfdir: /etc/apache + datadir: /usr/share/apache + installbuilddir: /usr/share/apache/build + errordir: /usr/share/apache/error + iconsdir: /usr/share/apache/icons + htdocsdir: /var/www + manualdir: /usr/share/doc/apache + cgidir: /var/www/cgi-bin + includedir: /usr/include + localstatedir: /var/lib/apache + runtimedir: /var/run/apache + logfiledir: /var/log/apache + proxycachedir: /var/lib/apache/proxy +