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