wok annotate php-mysql/receipt @ rev 1770
busybox udhcpc/zcip: call /etc/ip*.d scripts
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 26 18:02:56 2008 +0000 (2008-11-26) |
parents | 41897da4a1db |
children | 1143af92f66a |
rev | line source |
---|---|
pascal@1143 | 1 # SliTaz package receipt. |
pascal@1143 | 2 |
pascal@1143 | 3 PACKAGE="php-mysql" |
pascal@1143 | 4 VERSION="5.2.5" |
pascal@1143 | 5 CATEGORY="development" |
pascal@1143 | 6 SHORT_DESC="mysql module for PHP web programming language." |
pascal@1143 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1143 | 8 DEPENDS="libmysqlclient php" |
pascal@1143 | 9 WEB_SITE="http://www.php.net/" |
pascal@1143 | 10 WANTED="php" |
pascal@1143 | 11 |
pascal@1143 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1143 | 13 genpkg_rules() |
pascal@1143 | 14 { |
pascal@1143 | 15 mkdir -p $fs/usr/share/php |
pascal@1143 | 16 cp $(find $_pkg | grep mysql.so) $fs/usr/share/php/ |
pascal@1143 | 17 } |
pascal@1143 | 18 |
pascal@1143 | 19 # Post and pre install commans to stop |
pascal@1143 | 20 # and restart Web server if needed. |
pascal@1143 | 21 pre_install() |
pascal@1143 | 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@1143 | 31 } |
pascal@1143 | 32 |
pascal@1143 | 33 post_install() |
pascal@1143 | 34 { |
pascal@1143 | 35 grep -q ^extension=msql.so $1/etc/php.ini || \ |
pascal@1143 | 36 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=mysql.so|' -i $1/etc/php.ini |
pascal@1143 | 37 # Start Web server. |
pascal@1315 | 38 while read daemon file; do |
pascal@1315 | 39 if [ -z "$1" -a -f /etc/init.d/$daemon \ |
pascal@1315 | 40 -a ! -f "/var/run/$file" ]; then |
pascal@1315 | 41 /etc/init.d/$daemon start |
pascal@1315 | 42 fi |
pascal@1315 | 43 done <<EOT |
pascal@1315 | 44 apache apache/httpd.pid |
pascal@1315 | 45 lighttpd lighttpd.pid |
pascal@1315 | 46 EOT |
pascal@1143 | 47 } |
pascal@1143 | 48 |
pascal@1749 | 49 # Pre and post remove commands for Tazpkg. |
pascal@1749 | 50 pre_remove() |
pascal@1749 | 51 { |
pascal@1749 | 52 sed -i '/.*=mysql.so.*/d' /etc/php.ini |
pascal@1749 | 53 |
pascal@1749 | 54 # Start Web server. |
pascal@1749 | 55 while read daemon file; do |
pascal@1749 | 56 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then |
pascal@1749 | 57 /etc/init.d/$daemon start |
pascal@1749 | 58 fi |
pascal@1749 | 59 done <<EOT |
pascal@1749 | 60 apache apache/httpd.pid |
pascal@1749 | 61 lighttpd lighttpd.pid |
pascal@1749 | 62 EOT |
pascal@1749 | 63 } |