wok view php/receipt @ rev 217

UP: tazwok (1.4)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 14 19:35:59 2008 +0100 (2008-02-14)
parents 4959e5789caa
children 8b267a450470
line source
1 # SliTaz package receipt.
3 PACKAGE="php"
4 VERSION="5.2.4"
5 CATEGORY="development"
6 SHORT_DESC="PHP web programming language."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="lighttpd"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.php.net/"
11 WGET_URL="http://us2.php.net/distributions/$TARBALL"
12 JWM_MENU='System tools:<Program icon="php.png" label="PHP info">firefox http://localhost/phpinfo/</Program>'
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure --prefix=/usr --sysconfdir=/etc \
19 --infodir=/usr/share/info --mandir=/usr/share/man \
20 $CONFIGURE_ARGS \
21 --enable-fastcgi \
22 --enable-discard-path \
23 --enable-force-cgi-redirect \
24 --enable-mbstring \
25 --with-config-file-path=/etc \
26 --with-zlib \
27 --disable-cli
28 # to get a 2 Mb php-cgi binary.
29 #
30 #--disable-libxml \
31 #--disable-all
32 make
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/bin $fs/etc $fs/usr/share
39 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
40 strip -s $fs/usr/bin/*
41 # Recommended config file, phpinfo and pixmaps.
42 cp $src/php.ini-recommended $fs/etc/php.ini
43 cp -a stuff/phpinfo $fs/usr/share
44 cp -a stuff/pixmaps $fs/usr/share
45 }
47 # Post and pre install commans to stop
48 # and restart Web server if needed.
49 pre_install()
50 {
51 local root
52 root=$1
53 if [ -f "$1/var/run/lighttpd.pid" ]; then
54 /etc/init.d/lighttpd stop
55 fi
56 # Backup existing php.ini
57 if [ -f "$1/etc/php.ini" ]; then
58 echo -n "Creating php.ini backup..."
59 cp $1/etc/php.ini $1/etc/php.ini.bak
60 status
61 fi
62 }
63 post_install()
64 {
65 local root
66 root=$1
67 # Restore original php.ini
68 if [ -f "$1/etc/php.ini.bak" ]; then
69 echo -n "Restoring php.ini backup..."
70 mv -f $1/etc/php.ini.bak $1/etc/php.ini
71 status
72 fi
73 # Start Web server.
74 if [ ! -f "/var/run/lighttpd.pid" ]; then
75 /etc/init.d/lighttpd start
76 fi
77 }