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