wok annotate php-sqlite/receipt @ rev 21999
updated sysstat (12.1.1 -> 12.1.7)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Oct 18 15:25:38 2019 +0100 (2019-10-18) |
parents | 9e01bc6321ea |
children | 84a3b4b621e1 |
rev | line source |
---|---|
slaxemulator@14614 | 1 # SliTaz package receipt. |
slaxemulator@14614 | 2 |
slaxemulator@14614 | 3 PACKAGE="php-sqlite" |
erjo@16733 | 4 VERSION="5.5.13" |
slaxemulator@14614 | 5 CATEGORY="development" |
slaxemulator@14614 | 6 SHORT_DESC="sqlite module for PHP web programming language." |
slaxemulator@14614 | 7 MAINTAINER="slaxemulator@gmail.com" |
pascal@15198 | 8 LICENSE="BSD" |
pascal@21278 | 9 WEB_SITE="https://www.php.net/" |
slaxemulator@14614 | 10 WANTED="php" |
slaxemulator@14614 | 11 |
pascal@15198 | 12 DEPENDS="php sqlite" |
pascal@15198 | 13 |
slaxemulator@14614 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
slaxemulator@14614 | 15 genpkg_rules() |
slaxemulator@14614 | 16 { |
slaxemulator@14614 | 17 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 18 cp $(find $install | grep sqlite.so) $fs/usr/share/php/ |
slaxemulator@14614 | 19 cp $(find $install | grep sqlite3.so) $fs/usr/share/php/ |
slaxemulator@14614 | 20 cp $(find $install | grep pdo_sqlite.so) $fs/usr/share/php/ |
slaxemulator@14614 | 21 } |
slaxemulator@14614 | 22 |
slaxemulator@14614 | 23 post_install() |
slaxemulator@14614 | 24 { |
pascal@18730 | 25 grep -q ^extension=sqlite3.so "$1/etc/php.ini" || \ |
pascal@18730 | 26 sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' -i "$1/etc/php.ini" |
slaxemulator@14614 | 27 # Start Web server. |
slaxemulator@14614 | 28 while read daemon file; do |
slaxemulator@14614 | 29 [ -z "$1" ] || continue |
slaxemulator@14614 | 30 if [ -f "/var/run/$file" ]; then |
slaxemulator@14614 | 31 /etc/init.d/$daemon stop |
slaxemulator@14614 | 32 sleep 2 |
slaxemulator@14614 | 33 fi |
slaxemulator@14614 | 34 if [ -f /etc/init.d/$daemon ]; then |
slaxemulator@14614 | 35 /etc/init.d/$daemon start |
slaxemulator@14614 | 36 fi |
slaxemulator@14614 | 37 done <<EOT |
slaxemulator@14614 | 38 apache apache/httpd.pid |
slaxemulator@14614 | 39 lighttpd lighttpd.pid |
slaxemulator@14614 | 40 EOT |
slaxemulator@14614 | 41 } |
slaxemulator@14614 | 42 |
slaxemulator@14614 | 43 # Pre and post remove commands for Tazpkg. |
slaxemulator@14614 | 44 pre_remove() |
slaxemulator@14614 | 45 { |
slaxemulator@14614 | 46 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini |
slaxemulator@14614 | 47 |
slaxemulator@14614 | 48 # Start Web server. |
slaxemulator@14614 | 49 while read daemon file; do |
slaxemulator@14614 | 50 [ -z "$1" ] || continue |
slaxemulator@14614 | 51 if [ -f "/var/run/$file" ]; then |
slaxemulator@14614 | 52 /etc/init.d/$daemon stop |
slaxemulator@14614 | 53 sleep 2 |
slaxemulator@14614 | 54 fi |
slaxemulator@14614 | 55 if [ -f /etc/init.d/$daemon ]; then |
slaxemulator@14614 | 56 /etc/init.d/$daemon start |
slaxemulator@14614 | 57 fi |
slaxemulator@14614 | 58 done <<EOT |
slaxemulator@14614 | 59 apache apache/httpd.pid |
slaxemulator@14614 | 60 lighttpd lighttpd.pid |
slaxemulator@14614 | 61 EOT |
slaxemulator@14614 | 62 } |