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