wok-current view php-sqlite/receipt @ rev 17341

slitaz-configs-base: Up (5.5.7); mesa-dri: remove vmwgfx
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Wed Nov 05 23:50:10 2014 +0100 (2014-11-05)
parents 76c1f14d1820
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="php-sqlite"
4 VERSION="5.5.13"
5 CATEGORY="development"
6 SHORT_DESC="sqlite module for PHP web programming language."
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="BSD"
9 WEB_SITE="http://www.php.net/"
10 WANTED="php"
12 DEPENDS="php sqlite"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/php
18 cp $(find $install | grep sqlite.so) $fs/usr/share/php/
19 cp $(find $install | grep sqlite3.so) $fs/usr/share/php/
20 cp $(find $install | grep pdo_sqlite.so) $fs/usr/share/php/
21 }
23 post_install()
24 {
25 grep -q ^extension=sqlite3.so $1/etc/php.ini || \
26 sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' -i $1/etc/php.ini
27 # Start Web server.
28 while read daemon file; do
29 [ -z "$1" ] || continue
30 if [ -f "/var/run/$file" ]; then
31 /etc/init.d/$daemon stop
32 sleep 2
33 fi
34 if [ -f /etc/init.d/$daemon ]; then
35 /etc/init.d/$daemon start
36 fi
37 done <<EOT
38 apache apache/httpd.pid
39 lighttpd lighttpd.pid
40 EOT
41 }
43 # Pre and post remove commands for Tazpkg.
44 pre_remove()
45 {
46 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
48 # Start Web server.
49 while read daemon file; do
50 [ -z "$1" ] || continue
51 if [ -f "/var/run/$file" ]; then
52 /etc/init.d/$daemon stop
53 sleep 2
54 fi
55 if [ -f /etc/init.d/$daemon ]; then
56 /etc/init.d/$daemon start
57 fi
58 done <<EOT
59 apache apache/httpd.pid
60 lighttpd lighttpd.pid
61 EOT
62 }