wok-current view php-dba/receipt @ rev 14614
Up: php to 5.4.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Jun 01 06:40:14 2013 +0000 (2013-06-01) |
parents | 855f42b596c0 |
children | 78cb1e930abd |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-dba"
4 VERSION="5.4.13"
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 $install | 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 [ -z "$1" ] || continue
60 if [ -f "/var/run/$file" ]; then
61 /etc/init.d/$daemon stop
62 sleep 2
63 fi
64 if [ -f /etc/init.d/$daemon ]; then
65 /etc/init.d/$daemon start
66 fi
67 done <<EOT
68 apache apache/httpd.pid
69 lighttpd lighttpd.pid
70 EOT
71 }