wok-next annotate php/receipt @ rev 328

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