wok-stable diff php/receipt @ rev 1315
php*: add apache support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 27 18:48:42 2008 +0000 (2008-08-27) |
parents | c932ccf0e453 |
children | 0db2ef809433 |
line diff
1.1 --- a/php/receipt Sun Aug 10 09:23:04 2008 +0000 1.2 +++ b/php/receipt Wed Aug 27 18:48:42 2008 +0000 1.3 @@ -5,36 +5,49 @@ 1.4 CATEGORY="development" 1.5 SHORT_DESC="PHP web programming language." 1.6 MAINTAINER="pankso@slitaz.org" 1.7 -DEPENDS="lighttpd zlib libxml2 sqlite" 1.8 -BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev postgresql postgresql-dev gettext openssl-dev" 1.9 +DEPENDS="php-common lighttpd zlib libxml2 sqlite" 1.10 +BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev postgresql postgresql-dev gettext openssl-dev apache-dev apache" 1.11 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.12 WEB_SITE="http://www.php.net/" 1.13 WGET_URL="http://us2.php.net/distributions/$TARBALL" 1.14 -CONFIG_FILES="/etc/php.ini" 1.15 +PROVIDE="php:lighttpd" 1.16 1.17 # Rules to configure and make the package. 1.18 compile_rules() 1.19 { 1.20 cd $src 1.21 - ./configure \ 1.22 - --prefix=/usr \ 1.23 - --sysconfdir=/etc \ 1.24 - --infodir=/usr/share/info \ 1.25 - --mandir=/usr/share/man \ 1.26 - --enable-fastcgi \ 1.27 - --enable-discard-path \ 1.28 - --enable-force-cgi-redirect \ 1.29 - --enable-mbstring \ 1.30 - --with-config-file-path=/etc \ 1.31 - --with-zlib \ 1.32 - --with-gettext \ 1.33 - --with-mysql=shared,usr \ 1.34 - --with-pgsql=shared,usr \ 1.35 - --with-ldap=shared \ 1.36 - --disable-cli \ 1.37 - $CONFIGURE_ARGS 1.38 - make 1.39 - make INSTALL_ROOT=$PWD/_pkg install 1.40 + COMMON_ARGS="\ 1.41 +--prefix=/usr \ 1.42 +--sysconfdir=/etc \ 1.43 +--infodir=/usr/share/info \ 1.44 +--mandir=/usr/share/man \ 1.45 +--enable-fastcgi \ 1.46 +--enable-discard-path \ 1.47 +--enable-force-cgi-redirect \ 1.48 +--enable-mbstring \ 1.49 +--with-config-file-path=/etc \ 1.50 +--with-zlib \ 1.51 +--with-gettext \ 1.52 +--with-mysql=shared,usr \ 1.53 +--with-pgsql=shared,usr \ 1.54 +--with-ldap=shared \ 1.55 +--disable-cli" 1.56 + ./configure $COMMON_ARGS $CONFIGURE_ARGS && \ 1.57 + make && make INSTALL_ROOT=$PWD/_pkg install 1.58 + ./configure $COMMON_ARGS --with-apxs2=/usr/bin/apxs $CONFIGURE_ARGS && \ 1.59 + make && { 1.60 + mkdir -p _pkg/etc/apache 1.61 + cp /etc/apache/httpd.conf _pkg/etc/apache/httpd.conf 1.62 + make INSTALL_ROOT=$PWD/_pkg install 1.63 + } 1.64 + # Recommended config file and phpinfo. 1.65 + cp php.ini-recommended _pkg/etc/php.ini 1.66 + sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ 1.67 + -i _pkg/etc/php.ini 1.68 + cp -a ../stuff/phpinfo _pkg/usr/share 1.69 + mkdir _pkg/usr/share/applications _pkg/usr/share/pixmap 1.70 + cp ../stuff/php.desktop _pkg/usr/share/applications 1.71 + cp ../stuff/php.png _pkg/usr/share/pixmap 1.72 } 1.73 1.74 # Rules to gen a SliTaz package suitable for Tazpkg. 1.75 @@ -42,43 +55,22 @@ 1.76 { 1.77 mkdir -p $fs/usr/bin $fs/etc $fs/usr/share 1.78 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin 1.79 - # Recommended config file and phpinfo. 1.80 - cp $src/php.ini-recommended $fs/etc/php.ini 1.81 - sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ 1.82 - -i $fs/etc/php.ini 1.83 - cp -a stuff/phpinfo $fs/usr/share 1.84 for i in $(cd $WOK; ls -d php-*) 1.85 do 1.86 tazwok cook $i 1.87 done 1.88 } 1.89 1.90 -# Post and pre install commans to stop 1.91 +# Post and pre install commands to stop 1.92 # and restart Web server if needed. 1.93 pre_install() 1.94 { 1.95 if [ -f "$1/var/run/lighttpd.pid" ]; then 1.96 /etc/init.d/lighttpd stop 1.97 fi 1.98 - # Backup existing php.ini 1.99 - if [ -f "$1/etc/php.ini" ]; then 1.100 - echo -n "Creating php.ini backup..." 1.101 - cp $1/etc/php.ini $1/etc/php.ini.bak 1.102 - status 1.103 - fi 1.104 } 1.105 post_install() 1.106 { 1.107 - ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.108 - $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 1.109 -etc/php.ini 1.110 -EOT 1.111 - # Restore original php.ini 1.112 - if [ -f "$1/etc/php.ini.bak" ]; then 1.113 - echo -n "Restoring php.ini backup..." 1.114 - mv -f $1/etc/php.ini.bak $1/etc/php.ini 1.115 - status 1.116 - fi 1.117 # Enable php 1.118 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.119 [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \ 1.120 @@ -96,8 +88,3 @@ 1.121 /etc/init.d/lighttpd start 1.122 fi 1.123 } 1.124 - 1.125 -repack_cleanup() 1.126 -{ 1.127 - zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 1.128 -}