wok-current annotate php-dba/receipt @ rev 19759
libwnck3, thunar-volman: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 19 10:13:00 2017 +0100 (2017-02-19) |
parents | 55f67249b264 |
children | ccb0caebef6f |
rev | line source |
---|---|
pascal@3768 | 1 # SliTaz package receipt. |
pascal@3768 | 2 |
pascal@3768 | 3 PACKAGE="php-dba" |
erjo@16733 | 4 VERSION="5.5.13" |
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@15198 | 8 LICENSE="BSD" |
pascal@3768 | 9 WEB_SITE="http://www.php.net/" |
pascal@3768 | 10 WANTED="php" |
pascal@3768 | 11 |
pascal@3768 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@3768 | 13 genpkg_rules() |
pascal@3768 | 14 { |
pascal@3768 | 15 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 16 cp $(find $install | grep dba.so) $fs/usr/share/php/ |
pascal@3768 | 17 } |
pascal@3768 | 18 |
pascal@3768 | 19 # Post and pre install commans to stop |
pascal@3768 | 20 # and restart Web server if needed. |
pascal@3768 | 21 pre_install() |
pascal@3768 | 22 { |
pascal@3768 | 23 while read daemon file; do |
pascal@3768 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@3768 | 25 /etc/init.d/$daemon stop |
pascal@3768 | 26 fi |
pascal@3768 | 27 done <<EOT |
pascal@3768 | 28 apache apache/httpd.pid |
pascal@3768 | 29 lighttpd lighttpd.pid |
pascal@3768 | 30 EOT |
pascal@3768 | 31 } |
pascal@3768 | 32 |
pascal@3768 | 33 post_install() |
pascal@3768 | 34 { |
pascal@18730 | 35 grep -q ^extension=dba.so "$1/etc/php.ini" || \ |
pascal@18730 | 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=dba.so|' -i "$1/etc/php.ini" |
pascal@3768 | 37 # Start Web server. |
pascal@3768 | 38 while read daemon file; do |
pascal@3768 | 39 [ -z "$1" ] || continue |
pascal@3768 | 40 if [ -f "/var/run/$file" ]; then |
pascal@3768 | 41 /etc/init.d/$daemon stop |
pascal@3768 | 42 sleep 2 |
pascal@3768 | 43 fi |
pascal@3768 | 44 if [ -f /etc/init.d/$daemon ]; then |
pascal@3768 | 45 /etc/init.d/$daemon start |
pascal@3768 | 46 fi |
pascal@3768 | 47 done <<EOT |
pascal@3768 | 48 apache apache/httpd.pid |
pascal@3768 | 49 lighttpd lighttpd.pid |
pascal@3768 | 50 EOT |
pascal@3768 | 51 } |
pascal@3768 | 52 |
pascal@3768 | 53 # Pre and post remove commands for Tazpkg. |
pascal@3768 | 54 pre_remove() |
pascal@3768 | 55 { |
pascal@3768 | 56 sed -i '/.*=dba.so.*/d' /etc/php.ini |
pascal@3768 | 57 |
pascal@3768 | 58 # Start Web server. |
pascal@3768 | 59 while read daemon file; do |
slaxemulator@14614 | 60 [ -z "$1" ] || continue |
slaxemulator@14614 | 61 if [ -f "/var/run/$file" ]; then |
pascal@3768 | 62 /etc/init.d/$daemon stop |
pascal@3768 | 63 sleep 2 |
slaxemulator@14614 | 64 fi |
slaxemulator@14614 | 65 if [ -f /etc/init.d/$daemon ]; then |
pascal@3768 | 66 /etc/init.d/$daemon start |
pascal@3768 | 67 fi |
pascal@3768 | 68 done <<EOT |
pascal@3768 | 69 apache apache/httpd.pid |
pascal@3768 | 70 lighttpd lighttpd.pid |
pascal@3768 | 71 EOT |
pascal@3768 | 72 } |