wok-current annotate php-odbc/receipt @ rev 15167

dummynet: fix kvers
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 15 23:01:14 2013 +0000 (2013-08-15)
parents 855f42b596c0
children 78cb1e930abd
rev   line source
pascal@1832 1 # SliTaz package receipt.
pascal@1832 2
pascal@1832 3 PACKAGE="php-odbc"
slaxemulator@14614 4 VERSION="5.4.13"
pascal@1832 5 CATEGORY="development"
pascal@1832 6 SHORT_DESC="ODBC module for PHP web programming language."
pascal@1832 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1832 8 DEPENDS="unixODBC php"
pascal@1832 9 WEB_SITE="http://www.php.net/"
pascal@1832 10 WANTED="php"
pascal@1832 11
pascal@1832 12 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1832 13 genpkg_rules()
pascal@1832 14 {
pascal@1832 15 mkdir -p $fs/usr/share/php
slaxemulator@14614 16 cp $(find $install | grep odbc.so) $fs/usr/share/php/
pascal@1832 17 }
pascal@1832 18
pascal@1832 19 # Post and pre install commans to stop
pascal@1832 20 # and restart Web server if needed.
pascal@1832 21 pre_install()
pascal@1832 22 {
pascal@1832 23 while read daemon file; do
pascal@1832 24 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@1832 25 /etc/init.d/$daemon stop
pascal@1832 26 fi
pascal@1832 27 done <<EOT
pascal@1832 28 apache apache/httpd.pid
pascal@1832 29 lighttpd lighttpd.pid
pascal@1832 30 EOT
pascal@1832 31 }
pascal@1832 32
pascal@1832 33 post_install()
pascal@1832 34 {
pascal@1832 35 grep -q ^extension=odbc.so $1/etc/php.ini || \
pascal@4923 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=odbc.so|' -i $1/etc/php.ini
pascal@1832 37 # Start Web server.
pascal@1832 38 while read daemon file; do
pascal@1832 39 [ -z "$1" ] || continue
pascal@1832 40 if [ -f "/var/run/$file" ]; then
pascal@1832 41 /etc/init.d/$daemon stop
pascal@1832 42 sleep 2
pascal@1832 43 fi
pascal@1832 44 if [ -f /etc/init.d/$daemon ]; then
pascal@1832 45 /etc/init.d/$daemon start
pascal@1832 46 fi
pascal@1832 47 done <<EOT
pascal@1832 48 apache apache/httpd.pid
pascal@1832 49 lighttpd lighttpd.pid
pascal@1832 50 EOT
pascal@1832 51 }
pascal@1832 52
pascal@1832 53 # Pre and post remove commands for Tazpkg.
pascal@1832 54 pre_remove()
pascal@1832 55 {
pascal@1832 56 sed -i '/.*=odbc.so.*/d' /etc/php.ini
pascal@1832 57
pascal@1832 58 # Start Web server.
pascal@1832 59 while read daemon file; do
slaxemulator@14614 60 [ -z "$1" ] || continue
slaxemulator@14614 61 if [ -f "/var/run/$file" ]; then
pascal@1832 62 /etc/init.d/$daemon stop
pascal@1832 63 sleep 2
slaxemulator@14614 64 fi
slaxemulator@14614 65 if [ -f /etc/init.d/$daemon ]; then
pascal@1832 66 /etc/init.d/$daemon start
pascal@1832 67 fi
pascal@1832 68 done <<EOT
pascal@1832 69 apache apache/httpd.pid
pascal@1832 70 lighttpd lighttpd.pid
pascal@1832 71 EOT
pascal@1832 72 }