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