wok-next diff php-sqlite/receipt @ rev 14802

dev86: remove wrong error trigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jul 16 10:22:13 2013 +0200 (2013-07-16)
parents
children 78cb1e930abd
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/php-sqlite/receipt	Tue Jul 16 10:22:13 2013 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="php-sqlite"
     1.7 +VERSION="5.4.13"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="sqlite module for PHP web programming language."
    1.10 +MAINTAINER="slaxemulator@gmail.com"
    1.11 +DEPENDS="php sqlite"
    1.12 +WEB_SITE="http://www.php.net/"
    1.13 +WANTED="php"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p $fs/usr/share/php
    1.19 +	cp $(find $install | grep sqlite.so) $fs/usr/share/php/
    1.20 +	cp $(find $install | grep sqlite3.so) $fs/usr/share/php/
    1.21 +	cp $(find $install | grep pdo_sqlite.so) $fs/usr/share/php/
    1.22 +}
    1.23 +
    1.24 +post_install()
    1.25 +{
    1.26 +	grep -q ^extension=sqlite3.so $1/etc/php.ini || \
    1.27 +	    sed -e 's|extension=msql.so|extension=msql.so\nextension=sqlite3.so|' -i $1/etc/php.ini
    1.28 +	# Start Web server.
    1.29 +	while read daemon file; do
    1.30 +		[ -z "$1" ] || continue
    1.31 +		if [ -f "/var/run/$file" ]; then
    1.32 +			/etc/init.d/$daemon stop
    1.33 +			sleep 2
    1.34 +		fi
    1.35 +		if [ -f /etc/init.d/$daemon ]; then
    1.36 +			/etc/init.d/$daemon start
    1.37 +		fi
    1.38 +	done <<EOT
    1.39 +apache apache/httpd.pid
    1.40 +lighttpd lighttpd.pid
    1.41 +EOT
    1.42 +}
    1.43 +
    1.44 +# Pre and post remove commands for Tazpkg.
    1.45 +pre_remove()
    1.46 +{
    1.47 +	sed -i '/.*=sqlite3.so.*/d' /etc/php.ini
    1.48 +
    1.49 +	# Start Web server.
    1.50 +	while read daemon file; do
    1.51 +		[ -z "$1" ] || continue
    1.52 +		if [ -f "/var/run/$file" ]; then
    1.53 +			/etc/init.d/$daemon stop
    1.54 +			sleep 2
    1.55 +		fi
    1.56 +		if [ -f /etc/init.d/$daemon ]; then
    1.57 +			/etc/init.d/$daemon start
    1.58 +		fi
    1.59 +	done <<EOT
    1.60 +apache apache/httpd.pid
    1.61 +lighttpd lighttpd.pid
    1.62 +EOT
    1.63 +}
    1.64 \ No newline at end of file