wok view 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
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 openssl"
13 BUILD_DEPENDS="apr-util-dev apr-dev openssl-dev"
14 CONFIG_FILES="/etc/apache /var/www"
15 PROVIDE="lighttpd"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 grep -q Slitaz config.layout || \
22 cat ../stuff/slitaz.layout >> config.layout
23 ./configure --mandir=/usr/share/man --enable-mods-shared=all \
24 --enable-proxy --enable-ssl \
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 rm -rf $fs/etc/apache/original
40 cp -a $_pkg/var $fs
41 ln -s /usr/bin/apachectl $fs/etc/init.d/apache
42 sed -i -e 's|User daemon|User www|' -e 's|Group daemon|Group www|' \
43 -e 's|ServerAdmin you@example.com|ServerAdmin root@localhost|' \
44 $fs/etc/apache/httpd.conf
45 echo "Include /etc/apache/conf.d" >> $fs/etc/apache/httpd.conf
46 # Cook all packages based on apache
47 for i in $(cd $WOK; ls -d apache-*)
48 do
49 tazwok genpkg $i
50 done
51 }
53 # Pre and post install commands for Tazpkg.
54 # We stop the server by default in case of upgarde.
55 pre_install()
56 {
57 echo "Processing pre-install commands..."
58 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
59 }
61 post_install()
62 {
63 echo "Processing post-install commands..."
64 # Just in case.
65 chown www.www $1/var/log/$PACKAGE
66 ping -c 2 $(hostname) > /dev/null 2>&1 ||
67 sed -i "s/localhost/$(hostname) localhost/" /etc/hosts
68 /etc/init.d/$PACKAGE start
69 }
71 # Rules to clean extras dirs or files
72 clean_wok()
73 {
74 rm -rf $WOK/$PACKAGE/${PACKAGE}.${VERSION}
75 }