wok-current annotate php-pgsql/receipt @ rev 8069

Down: elfutils to 0.150. Test run-prelink-addr-test.sh was failing in 0.151.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Jan 21 13:50:12 2011 +0000 (2011-01-21)
parents ed560df8d2fc
children 855f42b596c0
rev   line source
pascal@1149 1 # SliTaz package receipt.
pascal@1149 2
pascal@1149 3 PACKAGE="php-pgsql"
slaxemulator@7925 4 VERSION="5.2.17"
pascal@1149 5 CATEGORY="development"
pascal@1149 6 SHORT_DESC="postgresql module for PHP web programming language."
pascal@1149 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1149 8 DEPENDS="postgresql php"
pascal@1149 9 WEB_SITE="http://www.php.net/"
pascal@1149 10 WANTED="php"
pascal@1149 11
pascal@1149 12 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1149 13 genpkg_rules()
pascal@1149 14 {
pascal@1149 15 mkdir -p $fs/usr/share/php
pascal@1149 16 cp $(find $_pkg | grep pgsql.so) $fs/usr/share/php/
pascal@1149 17 }
pascal@1149 18
pascal@1149 19 # Post and pre install commans to stop
pascal@1149 20 # and restart Web server if needed.
pascal@1149 21 pre_install()
pascal@1149 22 {
pascal@1315 23 while read daemon file; do
pascal@1315 24 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@1315 25 /etc/init.d/$daemon stop
pascal@1315 26 fi
pascal@1315 27 done <<EOT
pascal@1315 28 apache apache/httpd.pid
pascal@1315 29 lighttpd lighttpd.pid
pascal@1315 30 EOT
pascal@1149 31 }
pascal@1149 32
pascal@1149 33 post_install()
pascal@1149 34 {
pascal@1833 35 grep -q ^extension=pgsql.so $1/etc/php.ini || \
pascal@4923 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=pgsql.so|' -i $1/etc/php.ini
pascal@1149 37 # Start Web server.
pascal@1315 38 while read daemon file; do
pascal@1805 39 [ -z "$1" ] || continue
pascal@1805 40 if [ -f "/var/run/$file" ]; then
pascal@1805 41 /etc/init.d/$daemon stop
pascal@1805 42 sleep 2
pascal@1805 43 fi
pascal@1805 44 if [ -f /etc/init.d/$daemon ]; then
pascal@1315 45 /etc/init.d/$daemon start
pascal@1315 46 fi
pascal@1315 47 done <<EOT
pascal@1315 48 apache apache/httpd.pid
pascal@1315 49 lighttpd lighttpd.pid
pascal@1315 50 EOT
pascal@1149 51 }
pascal@1149 52
pascal@1749 53 # Pre and post remove commands for Tazpkg.
pascal@1749 54 pre_remove()
pascal@1749 55 {
pascal@1749 56 sed -i '/.*=pgsql.so.*/d' /etc/php.ini
pascal@1749 57
pascal@1749 58 # Start Web server.
pascal@1749 59 while read daemon file; do
pascal@1805 60 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
pascal@1805 61 /etc/init.d/$daemon stop
pascal@1805 62 sleep 2
pascal@1749 63 /etc/init.d/$daemon start
pascal@1749 64 fi
pascal@1749 65 done <<EOT
pascal@1749 66 apache apache/httpd.pid
pascal@1749 67 lighttpd lighttpd.pid
pascal@1749 68 EOT
pascal@1749 69 }