wok-next view php-dbase/receipt @ rev 12799
libdrm: typo in genpkg_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 18 11:41:28 2012 +0200 (2012-05-18) |
parents | ed560df8d2fc |
children | 855f42b596c0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-dbase"
4 VERSION="5.2.17"
5 CATEGORY="development"
6 SHORT_DESC="dbase 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 dbase.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=dbase.so $1/etc/php.ini || \
35 sed -e 's|extension=msql.so|extension=msql.so\nextension=dbase.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 '/.*=dbase.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 }