wok annotate php/receipt @ rev 7618
Up: php to 5.2.15. Will need to updated 5.3.x soon since this is the last 5.2.x update.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Dec 12 08:13:09 2010 +0000 (2010-12-12) |
parents | 5ab7a4c93ec4 |
children | ed560df8d2fc |
rev | line source |
---|---|
pankso@18 | 1 # SliTaz package receipt. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="php" |
slaxemulator@7618 | 4 VERSION="5.2.15" |
pankso@204 | 5 CATEGORY="development" |
pankso@18 | 6 SHORT_DESC="PHP web programming language." |
pankso@18 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@7612 | 8 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl" |
slaxemulator@6569 | 9 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib zlib-dev libmysqlclient mysql-dev net-snmp-dev \ |
pascal@2622 | 10 postgresql postgresql-dev gettext openssl-dev apache-dev apache apr-util-dev \ |
slaxemulator@6569 | 11 c-client mhash mhash-dev libpng libpng-dev libunixODBC unixODBC-dev openldap-dev libldap apr-dev libmcrypt-dev curl curl-dev cyrus-sasl-dev perl pkg-config jpeg-dev jpeg" |
pankso@18 | 12 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@18 | 13 WEB_SITE="http://www.php.net/" |
pankso@18 | 14 WGET_URL="http://us2.php.net/distributions/$TARBALL" |
pascal@1315 | 15 PROVIDE="php:lighttpd" |
pankso@18 | 16 |
pankso@18 | 17 # Rules to configure and make the package. |
pankso@18 | 18 compile_rules() |
pankso@18 | 19 { |
pankso@18 | 20 cd $src |
pascal@1315 | 21 COMMON_ARGS="\ |
pascal@1315 | 22 --prefix=/usr \ |
pascal@1315 | 23 --sysconfdir=/etc \ |
pascal@1315 | 24 --infodir=/usr/share/info \ |
pascal@1315 | 25 --mandir=/usr/share/man \ |
pascal@1315 | 26 --enable-fastcgi \ |
pascal@1315 | 27 --enable-discard-path \ |
pascal@1315 | 28 --enable-force-cgi-redirect \ |
pascal@1315 | 29 --enable-mbstring \ |
pascal@3239 | 30 --enable-sockets \ |
pascal@3767 | 31 --enable-ftp \ |
pascal@3767 | 32 --enable-zip \ |
pascal@3767 | 33 --enable-calendar \ |
pascal@3767 | 34 --enable-exif \ |
pascal@3768 | 35 --enable-dba=shared \ |
pascal@7544 | 36 --enable-dbase=shared \ |
pascal@1315 | 37 --with-config-file-path=/etc \ |
pascal@1315 | 38 --with-zlib \ |
pascal@1315 | 39 --with-gettext \ |
erjo@4407 | 40 --with-mcrypt=shared,/usr \ |
pascal@1324 | 41 --with-mysql=shared,/usr \ |
pascal@1324 | 42 --with-pgsql=shared,/usr \ |
pascal@3230 | 43 --with-snmp=shared,/usr \ |
pascal@1315 | 44 --with-ldap=shared \ |
pascal@1324 | 45 --with-imap=shared --with-imap-ssl \ |
pascal@1324 | 46 --with-mhash=shared \ |
pascal@1326 | 47 --with-gd=shared \ |
pascal@3729 | 48 --with-jpeg-dir=/usr \ |
pascal@3729 | 49 --with-png-dir=/usr \ |
erjo@2671 | 50 --with-openssl=shared \ |
pascal@1832 | 51 --with-unixODBC=shared,/usr \ |
pascal@1779 | 52 --with-pear=/usr/share/php \ |
pankso@4427 | 53 --with-pdo-mysql=shared \ |
pankso@4427 | 54 --with-pdo-pgsql=shared \ |
jozee@5520 | 55 --with-curl=shared \ |
pascal@1779 | 56 " |
pascal@2605 | 57 sed -i 's/pam_start/pam_nostart/' configure |
pascal@1315 | 58 ./configure $COMMON_ARGS $CONFIGURE_ARGS && \ |
pascal@5781 | 59 make -j 4 && make INSTALL_ROOT=$PWD/_pkg install |
pascal@1315 | 60 ./configure $COMMON_ARGS --with-apxs2=/usr/bin/apxs $CONFIGURE_ARGS && \ |
pascal@5781 | 61 make -j 4 && { |
pascal@1315 | 62 mkdir -p _pkg/etc/apache |
pascal@1315 | 63 cp /etc/apache/httpd.conf _pkg/etc/apache/httpd.conf |
pascal@1315 | 64 make INSTALL_ROOT=$PWD/_pkg install |
pascal@1315 | 65 } |
pascal@1315 | 66 # Recommended config file and phpinfo. |
pascal@1315 | 67 cp php.ini-recommended _pkg/etc/php.ini |
pascal@1315 | 68 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ |
pascal@1315 | 69 -i _pkg/etc/php.ini |
pascal@1315 | 70 cp -a ../stuff/phpinfo _pkg/usr/share |
pascal@1547 | 71 mkdir _pkg/usr/share/applications _pkg/usr/share/pixmaps |
pascal@1315 | 72 cp ../stuff/php.desktop _pkg/usr/share/applications |
mallory@1405 | 73 cp ../stuff/php.png _pkg/usr/share/pixmaps |
pankso@18 | 74 } |
pankso@18 | 75 |
pankso@18 | 76 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 77 genpkg_rules() |
pankso@18 | 78 { |
pankso@18 | 79 mkdir -p $fs/usr/bin $fs/etc $fs/usr/share |
pankso@18 | 80 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin |
pascal@1143 | 81 for i in $(cd $WOK; ls -d php-*) |
pascal@1143 | 82 do |
pascal@1143 | 83 tazwok cook $i |
pascal@1143 | 84 done |
pankso@18 | 85 } |
pankso@18 | 86 |
pascal@1315 | 87 # Post and pre install commands to stop |
pankso@18 | 88 # and restart Web server if needed. |
pankso@18 | 89 pre_install() |
pankso@18 | 90 { |
pankso@18 | 91 if [ -f "$1/var/run/lighttpd.pid" ]; then |
pankso@18 | 92 /etc/init.d/lighttpd stop |
pankso@18 | 93 fi |
pankso@18 | 94 } |
pankso@18 | 95 post_install() |
pankso@18 | 96 { |
pascal@1143 | 97 # Enable php |
pascal@1143 | 98 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1143 | 99 [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \ |
pascal@1143 | 100 tazpkg get-install lighttpd-modules --root=$1/ |
pascal@1143 | 101 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \ |
pascal@1143 | 102 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \ |
pascal@1143 | 103 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \ |
pascal@1143 | 104 -i $1/etc/lighttpd/lighttpd.conf |
pascal@1143 | 105 grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \ |
pascal@1143 | 106 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \ |
pascal@1143 | 107 -i $1/etc/lighttpd/lighttpd.conf |
pascal@1349 | 108 grep -q php3 $1/etc/lighttpd/lighttpd.conf || \ |
pascal@1635 | 109 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \ |
pascal@1583 | 110 -i $1/etc/lighttpd/lighttpd.conf |
pascal@1143 | 111 fi |
pankso@18 | 112 # Start Web server. |
pascal@1137 | 113 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then |
pankso@18 | 114 /etc/init.d/lighttpd start |
pankso@18 | 115 fi |
pankso@18 | 116 } |