wok view php/receipt @ rev 262
Add a few X app (xcursorgen to build slitaz-polar-cursors
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 24 20:46:37 2008 +0100 (2008-02-24) |
parents | 17a39e4461e4 |
children | eb4e6a1af180 |
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"
13 JWM_MENU='System tools:<Program icon="php.png" label="PHP info">firefox http://localhost/phpinfo/</Program>'
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure \
20 --prefix=/usr \
21 --sysconfdir=/etc \
22 --infodir=/usr/share/info \
23 --mandir=/usr/share/man \
24 --enable-fastcgi \
25 --enable-discard-path \
26 --enable-force-cgi-redirect \
27 --enable-mbstring \
28 --with-config-file-path=/etc \
29 --with-zlib \
30 --disable-cli \
31 $CONFIGURE_ARGS
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 # Recommended config file and phpinfo.
41 cp $src/php.ini-recommended $fs/etc/php.ini
42 cp -a stuff/phpinfo $fs/usr/share
43 }
45 # Post and pre install commans to stop
46 # and restart Web server if needed.
47 pre_install()
48 {
49 local root
50 root=$1
51 if [ -f "$1/var/run/lighttpd.pid" ]; then
52 /etc/init.d/lighttpd stop
53 fi
54 # Backup existing php.ini
55 if [ -f "$1/etc/php.ini" ]; then
56 echo -n "Creating php.ini backup..."
57 cp $1/etc/php.ini $1/etc/php.ini.bak
58 status
59 fi
60 }
61 post_install()
62 {
63 local root
64 root=$1
65 # Restore original php.ini
66 if [ -f "$1/etc/php.ini.bak" ]; then
67 echo -n "Restoring php.ini backup..."
68 mv -f $1/etc/php.ini.bak $1/etc/php.ini
69 status
70 fi
71 # Start Web server.
72 if [ ! -f "/var/run/lighttpd.pid" ]; then
73 /etc/init.d/lighttpd start
74 fi
75 }