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