wok-current view php-sqlite/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 (9 months ago) |
parents | a23978bfa665 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="php-sqlite"
4 VERSION="7.4.33"
5 CATEGORY="development"
6 SHORT_DESC="sqlite module for PHP web programming language."
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="BSD"
9 WEB_SITE="https://www.php.net/"
11 DEPENDS="php sqlite"
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
21 cp $(find $install | grep sqlite.so) $fs/usr/share/php/
22 cp $(find $install | grep sqlite3.so) $fs/usr/share/php/
23 cp $(find $install | grep pdo_sqlite.so) $fs/usr/share/php/
24 }
26 post_install()
27 {
28 grep -q ^extension=sqlite3.so "$1/etc/php.ini" ||
29 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=sqlite3.so|' \
30 -i "$1/etc/php.ini"
32 # Start Web server.
33 while read daemon file
34 do
35 [ -z "$1" ] || continue
36 if [ -f "/var/run/$file" ]
37 then
38 /etc/init.d/$daemon stop
39 sleep 2
40 fi
41 if [ -f /etc/init.d/$daemon ]
42 then
43 /etc/init.d/$daemon start
44 fi
45 done <<EOT
46 apache apache/httpd.pid
47 lighttpd lighttpd.pid
48 EOT
49 }
51 # Pre and post remove commands for Tazpkg.
52 pre_remove()
53 {
54 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
56 # Start Web server.
57 while read daemon file
58 do
59 [ -z "$1" ] || continue
60 if [ -f "/var/run/$file" ]
61 then
62 /etc/init.d/$daemon stop
63 sleep 2
64 fi
65 if [ -f /etc/init.d/$daemon ]
66 then
67 /etc/init.d/$daemon start
68 fi
69 done <<EOT
70 apache apache/httpd.pid
71 lighttpd lighttpd.pid
72 EOT
73 }