wok-4.x annotate php/receipt @ rev 9859
php: should fix the receipt (missing $install and sed bdep)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 16 16:29:17 2011 +0200 (2011-05-16) |
parents | fc0d661345d6 |
children | cb5c920771ca |
rev | line source |
---|---|
pankso@18 | 1 # SliTaz package receipt. |
pankso@18 | 2 |
pankso@18 | 3 PACKAGE="php" |
slaxemulator@7925 | 4 VERSION="5.2.17" |
pankso@204 | 5 CATEGORY="development" |
pankso@18 | 6 SHORT_DESC="PHP web programming language." |
pankso@18 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@18 | 8 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@18 | 9 WEB_SITE="http://www.php.net/" |
pankso@18 | 10 WGET_URL="http://us2.php.net/distributions/$TARBALL" |
pascal@1315 | 11 PROVIDE="php:lighttpd" |
pankso@18 | 12 |
pankso@9859 | 13 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl" |
pankso@9859 | 14 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev libmysqlclient mysql-dev \ |
pankso@9859 | 15 net-snmp-dev postgresql-dev gettext openssl-dev apache-dev apr-util-dev \ |
pankso@9859 | 16 c-client mhash-dev libpng-dev libunixODBC unixODBC-dev openldap-dev \ |
pankso@9859 | 17 libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl pkg-config \ |
pankso@9859 | 18 jpeg-dev sed" |
pankso@9859 | 19 |
pankso@18 | 20 # Rules to configure and make the package. |
pankso@18 | 21 compile_rules() |
pankso@18 | 22 { |
pankso@18 | 23 cd $src |
pascal@1315 | 24 COMMON_ARGS="\ |
pascal@1315 | 25 --prefix=/usr \ |
pascal@1315 | 26 --sysconfdir=/etc \ |
pascal@1315 | 27 --infodir=/usr/share/info \ |
pascal@1315 | 28 --mandir=/usr/share/man \ |
pascal@1315 | 29 --enable-fastcgi \ |
pascal@1315 | 30 --enable-discard-path \ |
pascal@1315 | 31 --enable-force-cgi-redirect \ |
pascal@1315 | 32 --enable-mbstring \ |
pascal@3239 | 33 --enable-sockets \ |
pascal@3767 | 34 --enable-ftp \ |
pascal@3767 | 35 --enable-zip \ |
pascal@3767 | 36 --enable-calendar \ |
pascal@3767 | 37 --enable-exif \ |
pascal@3768 | 38 --enable-dba=shared \ |
pascal@7544 | 39 --enable-dbase=shared \ |
pascal@1315 | 40 --with-config-file-path=/etc \ |
pascal@1315 | 41 --with-zlib \ |
pascal@1315 | 42 --with-gettext \ |
erjo@4407 | 43 --with-mcrypt=shared,/usr \ |
pascal@1324 | 44 --with-mysql=shared,/usr \ |
pascal@1324 | 45 --with-pgsql=shared,/usr \ |
pascal@3230 | 46 --with-snmp=shared,/usr \ |
pascal@7740 | 47 --enable-soap=shared,/usr \ |
pascal@1315 | 48 --with-ldap=shared \ |
pascal@1324 | 49 --with-imap=shared --with-imap-ssl \ |
pascal@1324 | 50 --with-mhash=shared \ |
pascal@1326 | 51 --with-gd=shared \ |
pascal@3729 | 52 --with-jpeg-dir=/usr \ |
pascal@3729 | 53 --with-png-dir=/usr \ |
erjo@2671 | 54 --with-openssl=shared \ |
pascal@1832 | 55 --with-unixODBC=shared,/usr \ |
pascal@1779 | 56 --with-pear=/usr/share/php \ |
pankso@4427 | 57 --with-pdo-mysql=shared \ |
pankso@4427 | 58 --with-pdo-pgsql=shared \ |
jozee@5520 | 59 --with-curl=shared \ |
pascal@1779 | 60 " |
pascal@2605 | 61 sed -i 's/pam_start/pam_nostart/' configure |
pascal@1315 | 62 ./configure $COMMON_ARGS $CONFIGURE_ARGS && \ |
pankso@9795 | 63 make -j 4 && make INSTALL_ROOT=$PWD/install install |
pascal@1315 | 64 ./configure $COMMON_ARGS --with-apxs2=/usr/bin/apxs $CONFIGURE_ARGS && \ |
pascal@5781 | 65 make -j 4 && { |
pankso@9859 | 66 mkdir -p $install/etc/apache |
pankso@9859 | 67 cp /etc/apache/httpd.conf $install/etc/apache/httpd.conf |
pankso@9795 | 68 make INSTALL_ROOT=$install install |
pascal@1315 | 69 } |
pascal@1315 | 70 # Recommended config file and phpinfo. |
pankso@9795 | 71 cp php.ini-recommended $install/etc/php.ini |
pascal@1315 | 72 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ |
pankso@9795 | 73 -i $install/etc/php.ini |
pankso@9795 | 74 cp -a $stuff/phpinfo $install/usr/share |
pankso@9795 | 75 mkdir install/usr/share/applications $install/usr/share/pixmaps |
pankso@9795 | 76 cp $stuff/php.desktop $install/usr/share/applications |
pankso@9795 | 77 cp $stuff/php.png $install/usr/share/pixmaps |
pankso@18 | 78 } |
pankso@18 | 79 |
pankso@18 | 80 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@18 | 81 genpkg_rules() |
pankso@18 | 82 { |
pankso@18 | 83 mkdir -p $fs/usr/bin $fs/etc $fs/usr/share |
pankso@18 | 84 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin |
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 } |