wok-current view php-odbc/receipt @ rev 25728

Merge wok for both arch and few updates
author Stanislas Leduc <shann@slitaz.org>
date Thu Dec 05 08:39:45 2024 +0000 (5 weeks ago)
parents a23978bfa665
children
line source
1 # SliTaz package receipt.
3 PACKAGE="php-odbc"
4 VERSION="7.4.33"
5 CATEGORY="development"
6 SHORT_DESC="ODBC module for PHP web programming language."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.php.net/"
11 DEPENDS="unixODBC php"
12 WANTED="php"
14 HOST_ARCH="i486 x86_64"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share/php
20 cp $(find $install | grep odbc.so) $fs/usr/share/php/
21 }
23 # Post and pre install commans to stop
24 # and restart Web server if needed.
25 pre_install()
26 {
27 while read daemon file
28 do
29 if [ -z "$1" -a -f "/var/run/$file" ]
30 then
31 /etc/init.d/$daemon stop
32 fi
33 done <<EOT
34 apache apache/httpd.pid
35 lighttpd lighttpd.pid
36 EOT
37 }
39 post_install()
40 {
41 grep -q ^extension=odbc.so "$1/etc/php.ini" ||
42 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=odbc.so|' \
43 -i "$1/etc/php.ini"
45 # Start Web server.
46 while read daemon file
47 do
48 [ -z "$1" ] || continue
49 if [ -f "/var/run/$file" ]
50 then
51 /etc/init.d/$daemon stop
52 sleep 2
53 fi
54 if [ -f /etc/init.d/$daemon ]
55 then
56 /etc/init.d/$daemon start
57 fi
58 done <<EOT
59 apache apache/httpd.pid
60 lighttpd lighttpd.pid
61 EOT
62 }
64 # Pre and post remove commands for Tazpkg.
65 pre_remove()
66 {
67 sed -i '/.*=odbc.so.*/d' /etc/php.ini
69 # Start Web server.
70 while read daemon file
71 do
72 [ -z "$1" ] || continue
73 if [ -f "/var/run/$file" ]
74 then
75 /etc/init.d/$daemon stop
76 sleep 2
77 fi
78 if [ -f /etc/init.d/$daemon ]
79 then
80 /etc/init.d/$daemon start
81 fi
82 done <<EOT
83 apache apache/httpd.pid
84 lighttpd lighttpd.pid
85 EOT
86 }