wok-stable view apache/receipt @ rev 1602

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