wok view php-dba/receipt @ rev 24920

updated mp (5.2.10 -> 5.58)
author Hans-G?nter Theisgen
date Sun Apr 10 07:48:27 2022 +0100 (23 months ago)
parents b10d41313e54
children
line source
1 # SliTaz package receipt.
3 PACKAGE="php-dba"
4 VERSION="7.4.4"
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="https://www.php.net/"
11 WANTED="php"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/usr/share/php
17 cp $(find $install | grep dba.so) $fs/usr/share/php/
18 }
20 # Post and pre install commans to stop
21 # and restart Web server if needed.
22 pre_install()
23 {
24 while read daemon file
25 do
26 if [ -z "$1" -a -f "/var/run/$file" ]
27 then
28 /etc/init.d/$daemon stop
29 fi
30 done <<EOT
31 apache apache/httpd.pid
32 lighttpd lighttpd.pid
33 EOT
34 }
36 post_install()
37 {
38 grep -q ^extension=dba.so "$1/etc/php.ini" ||
39 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=dba.so|' \
40 -i "$1/etc/php.ini"
41 # Start Web server.
42 while read daemon file
43 do
44 [ -z "$1" ] || continue
45 if [ -f "/var/run/$file" ]
46 then
47 /etc/init.d/$daemon stop
48 sleep 2
49 fi
50 if [ -f /etc/init.d/$daemon ]
51 then
52 /etc/init.d/$daemon start
53 fi
54 done <<EOT
55 apache apache/httpd.pid
56 lighttpd lighttpd.pid
57 EOT
58 }
60 # Pre and post remove commands for Tazpkg.
61 pre_remove()
62 {
63 sed -i '/.*=dba.so.*/d' /etc/php.ini
65 # Start Web server.
66 while read daemon file
67 do
68 [ -z "$1" ] || continue
69 if [ -f "/var/run/$file" ]
70 then
71 /etc/init.d/$daemon stop
72 sleep 2
73 fi
74 if [ -f /etc/init.d/$daemon ]
75 then
76 /etc/init.d/$daemon start
77 fi
78 done <<EOT
79 apache apache/httpd.pid
80 lighttpd lighttpd.pid
81 EOT
82 }