wok-current annotate php-sqlite/receipt @ rev 15169

openmotif: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 16 08:18:06 2013 +0000 (2013-08-16)
parents
children 78cb1e930abd
rev   line source
slaxemulator@14614 1 # SliTaz package receipt.
slaxemulator@14614 2
slaxemulator@14614 3 PACKAGE="php-sqlite"
slaxemulator@14614 4 VERSION="5.4.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"
slaxemulator@14614 8 DEPENDS="php sqlite"
slaxemulator@14614 9 WEB_SITE="http://www.php.net/"
slaxemulator@14614 10 WANTED="php"
slaxemulator@14614 11
slaxemulator@14614 12 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@14614 13 genpkg_rules()
slaxemulator@14614 14 {
slaxemulator@14614 15 mkdir -p $fs/usr/share/php
slaxemulator@14614 16 cp $(find $install | grep sqlite.so) $fs/usr/share/php/
slaxemulator@14614 17 cp $(find $install | grep sqlite3.so) $fs/usr/share/php/
slaxemulator@14614 18 cp $(find $install | grep pdo_sqlite.so) $fs/usr/share/php/
slaxemulator@14614 19 }
slaxemulator@14614 20
slaxemulator@14614 21 post_install()
slaxemulator@14614 22 {
slaxemulator@14614 23 grep -q ^extension=sqlite3.so $1/etc/php.ini || \
slaxemulator@14614 24 sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' -i $1/etc/php.ini
slaxemulator@14614 25 # Start Web server.
slaxemulator@14614 26 while read daemon file; do
slaxemulator@14614 27 [ -z "$1" ] || continue
slaxemulator@14614 28 if [ -f "/var/run/$file" ]; then
slaxemulator@14614 29 /etc/init.d/$daemon stop
slaxemulator@14614 30 sleep 2
slaxemulator@14614 31 fi
slaxemulator@14614 32 if [ -f /etc/init.d/$daemon ]; then
slaxemulator@14614 33 /etc/init.d/$daemon start
slaxemulator@14614 34 fi
slaxemulator@14614 35 done <<EOT
slaxemulator@14614 36 apache apache/httpd.pid
slaxemulator@14614 37 lighttpd lighttpd.pid
slaxemulator@14614 38 EOT
slaxemulator@14614 39 }
slaxemulator@14614 40
slaxemulator@14614 41 # Pre and post remove commands for Tazpkg.
slaxemulator@14614 42 pre_remove()
slaxemulator@14614 43 {
slaxemulator@14614 44 sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
slaxemulator@14614 45
slaxemulator@14614 46 # Start Web server.
slaxemulator@14614 47 while read daemon file; do
slaxemulator@14614 48 [ -z "$1" ] || continue
slaxemulator@14614 49 if [ -f "/var/run/$file" ]; then
slaxemulator@14614 50 /etc/init.d/$daemon stop
slaxemulator@14614 51 sleep 2
slaxemulator@14614 52 fi
slaxemulator@14614 53 if [ -f /etc/init.d/$daemon ]; then
slaxemulator@14614 54 /etc/init.d/$daemon start
slaxemulator@14614 55 fi
slaxemulator@14614 56 done <<EOT
slaxemulator@14614 57 apache apache/httpd.pid
slaxemulator@14614 58 lighttpd lighttpd.pid
slaxemulator@14614 59 EOT
slaxemulator@14614 60 }