wok view php/receipt @ rev 1017

Add conky (light system monitor)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Jul 08 23:34:19 2008 +0200 (2008-07-08)
parents 8b267a450470
children 10710b8535bc
line source
1 # SliTaz package receipt.
3 PACKAGE="php"
4 VERSION="5.2.5"
5 CATEGORY="development"
6 SHORT_DESC="PHP web programming language."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="lighttpd zlib libxml2 sqlite"
9 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.php.net/"
12 WGET_URL="http://us2.php.net/distributions/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure \
19 --prefix=/usr \
20 --sysconfdir=/etc \
21 --infodir=/usr/share/info \
22 --mandir=/usr/share/man \
23 --enable-fastcgi \
24 --enable-discard-path \
25 --enable-force-cgi-redirect \
26 --enable-mbstring \
27 --with-config-file-path=/etc \
28 --with-zlib \
29 --disable-cli \
30 $CONFIGURE_ARGS
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 # Recommended config file and phpinfo.
40 cp $src/php.ini-recommended $fs/etc/php.ini
41 cp -a stuff/phpinfo $fs/usr/share
42 }
44 # Post and pre install commans to stop
45 # and restart Web server if needed.
46 pre_install()
47 {
48 local root
49 root=$1
50 if [ -f "$1/var/run/lighttpd.pid" ]; then
51 /etc/init.d/lighttpd stop
52 fi
53 # Backup existing php.ini
54 if [ -f "$1/etc/php.ini" ]; then
55 echo -n "Creating php.ini backup..."
56 cp $1/etc/php.ini $1/etc/php.ini.bak
57 status
58 fi
59 }
60 post_install()
61 {
62 local root
63 root=$1
64 # Restore original php.ini
65 if [ -f "$1/etc/php.ini.bak" ]; then
66 echo -n "Restoring php.ini backup..."
67 mv -f $1/etc/php.ini.bak $1/etc/php.ini
68 status
69 fi
70 # Start Web server.
71 if [ ! -f "/var/run/lighttpd.pid" ]; then
72 /etc/init.d/lighttpd start
73 fi
74 }