wok-6.x annotate php/receipt @ rev 901
Add screen
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 13 07:50:56 2008 +0000 (2008-06-13) |
parents | 8b267a450470 |
children | 10710b8535bc |
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" |
pankso@18 | 13 |
pankso@18 | 14 # Rules to configure and make the package. |
pankso@18 | 15 compile_rules() |
pankso@18 | 16 { |
pankso@18 | 17 cd $src |
pankso@238 | 18 ./configure \ |
pankso@238 | 19 --prefix=/usr \ |
pankso@238 | 20 --sysconfdir=/etc \ |
pankso@238 | 21 --infodir=/usr/share/info \ |
pankso@238 | 22 --mandir=/usr/share/man \ |
pankso@238 | 23 --enable-fastcgi \ |
pankso@238 | 24 --enable-discard-path \ |
pankso@238 | 25 --enable-force-cgi-redirect \ |
pankso@238 | 26 --enable-mbstring \ |
pankso@238 | 27 --with-config-file-path=/etc \ |
pankso@238 | 28 --with-zlib \ |
pankso@238 | 29 --disable-cli \ |
pankso@238 | 30 $CONFIGURE_ARGS |
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@238 | 39 # Recommended config file and phpinfo. |
pankso@18 | 40 cp $src/php.ini-recommended $fs/etc/php.ini |
pankso@18 | 41 cp -a stuff/phpinfo $fs/usr/share |
pankso@18 | 42 } |
pankso@18 | 43 |
pankso@18 | 44 # Post and pre install commans to stop |
pankso@18 | 45 # and restart Web server if needed. |
pankso@18 | 46 pre_install() |
pankso@18 | 47 { |
pankso@18 | 48 local root |
pankso@18 | 49 root=$1 |
pankso@18 | 50 if [ -f "$1/var/run/lighttpd.pid" ]; then |
pankso@18 | 51 /etc/init.d/lighttpd stop |
pankso@18 | 52 fi |
pankso@18 | 53 # Backup existing php.ini |
pankso@18 | 54 if [ -f "$1/etc/php.ini" ]; then |
pankso@18 | 55 echo -n "Creating php.ini backup..." |
pankso@18 | 56 cp $1/etc/php.ini $1/etc/php.ini.bak |
pankso@18 | 57 status |
pankso@18 | 58 fi |
pankso@18 | 59 } |
pankso@18 | 60 post_install() |
pankso@18 | 61 { |
pankso@18 | 62 local root |
pankso@18 | 63 root=$1 |
pankso@18 | 64 # Restore original php.ini |
pankso@18 | 65 if [ -f "$1/etc/php.ini.bak" ]; then |
pankso@18 | 66 echo -n "Restoring php.ini backup..." |
pankso@18 | 67 mv -f $1/etc/php.ini.bak $1/etc/php.ini |
pankso@18 | 68 status |
pankso@18 | 69 fi |
pankso@18 | 70 # Start Web server. |
pankso@18 | 71 if [ ! -f "/var/run/lighttpd.pid" ]; then |
pankso@18 | 72 /etc/init.d/lighttpd start |
pankso@18 | 73 fi |
pankso@18 | 74 } |
pankso@18 | 75 |