wok-current view php-dba/receipt @ rev 3768
Add php-dba
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 29 17:26:41 2009 +0200 (2009-07-29) |
parents | |
children | 6e3fc22e770a |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-dba"
4 VERSION="5.2.9"
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 }