wok-next view php/receipt @ rev 18

Add : perl*, php, python
author Christophe Lincoln <pankso@slitaz.org>
date Tue Dec 18 13:37:19 2007 +0100 (2007-12-18)
parents
children 4959e5789caa
line source
1 # SliTaz package receipt.
3 PACKAGE="php"
4 VERSION="5.2.4"
5 CATEGORY="extra"
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"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 cd $src
17 ./configure --prefix=/usr --sysconfdir=/etc \
18 --infodir=/usr/share/info --mandir=/usr/share/man \
19 $CONFIGURE_ARGS \
20 --enable-fastcgi \
21 --enable-discard-path \
22 --enable-force-cgi-redirect \
23 --enable-mbstring \
24 --with-config-file-path=/etc \
25 --with-zlib \
26 --disable-cli
27 # to get a 2 Mb php-cgi binary.
28 #
29 #--disable-libxml \
30 #--disable-all
31 make
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/bin $fs/etc $fs/usr/share
38 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
39 strip -s $fs/usr/bin/*
40 # Recommended config file, phpinfo and pixmaps.
41 cp $src/php.ini-recommended $fs/etc/php.ini
42 cp -a stuff/phpinfo $fs/usr/share
43 cp -a stuff/pixmaps $fs/usr/share
44 }
46 # Post and pre install commans to stop
47 # and restart Web server if needed.
48 pre_install()
49 {
50 local root
51 root=$1
52 if [ -f "$1/var/run/lighttpd.pid" ]; then
53 /etc/init.d/lighttpd stop
54 fi
55 # Backup existing php.ini
56 if [ -f "$1/etc/php.ini" ]; then
57 echo -n "Creating php.ini backup..."
58 cp $1/etc/php.ini $1/etc/php.ini.bak
59 status
60 fi
61 }
62 post_install()
63 {
64 local root
65 root=$1
66 # Restore original php.ini
67 if [ -f "$1/etc/php.ini.bak" ]; then
68 echo -n "Restoring php.ini backup..."
69 mv -f $1/etc/php.ini.bak $1/etc/php.ini
70 status
71 fi
72 # Start Web server.
73 if [ ! -f "/var/run/lighttpd.pid" ]; then
74 /etc/init.d/lighttpd start
75 fi
76 }