wok rev 4428
Add: php-pdo-mysql + php-pdo-pgsql (PDO support)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Oct 26 13:31:05 2009 +0100 (2009-10-26) |
parents | 6e3fc22e770a |
children | 2d4bbd951583 |
files | php-pdo-mysql/receipt php-pdo-pgsql/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-pdo-mysql/receipt Mon Oct 26 13:31:05 2009 +0100 1.3 @@ -0,0 +1,69 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-pdo-mysql" 1.7 +VERSION="5.2.11" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="PDO MySQL module for PHP web programming language." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +DEPENDS="php php-mysql" 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 $_pkg | grep pdo_mysql.so) $fs/usr/share/php/ 1.20 +} 1.21 + 1.22 +# Post and pre install commans to stop 1.23 +# and restart Web server if needed. 1.24 +pre_install() 1.25 +{ 1.26 + while read daemon file; do 1.27 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.28 + /etc/init.d/$daemon stop 1.29 + fi 1.30 + done <<EOT 1.31 +apache apache/httpd.pid 1.32 +lighttpd lighttpd.pid 1.33 +EOT 1.34 +} 1.35 + 1.36 +post_install() 1.37 +{ 1.38 + grep -q ^extension=pdo_mysql.so $1/etc/php.ini || \ 1.39 + sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=pdo_mysql.so|' -i $1/etc/php.ini 1.40 + # Start Web server. 1.41 + while read daemon file; do 1.42 + [ -z "$1" ] || continue 1.43 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.44 + /etc/init.d/$daemon stop 1.45 + sleep 2 1.46 + fi 1.47 + if [ -z "$1" -a -f /etc/init.d/$daemon ]; then 1.48 + /etc/init.d/$daemon start 1.49 + fi 1.50 + done <<EOT 1.51 +apache apache/httpd.pid 1.52 +lighttpd lighttpd.pid 1.53 +EOT 1.54 +} 1.55 + 1.56 +# Pre and post remove commands for Tazpkg. 1.57 +pre_remove() 1.58 +{ 1.59 + sed -i '/.*=pdo_mysql.so.*/d' /etc/php.ini 1.60 + 1.61 + # Start Web server. 1.62 + while read daemon file; do 1.63 + if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then 1.64 + /etc/init.d/$daemon stop 1.65 + sleep 2 1.66 + /etc/init.d/$daemon start 1.67 + fi 1.68 + done <<EOT 1.69 +apache apache/httpd.pid 1.70 +lighttpd lighttpd.pid 1.71 +EOT 1.72 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/php-pdo-pgsql/receipt Mon Oct 26 13:31:05 2009 +0100 2.3 @@ -0,0 +1,69 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="php-pdo-pgsql" 2.7 +VERSION="5.2.11" 2.8 +CATEGORY="development" 2.9 +SHORT_DESC="PDO PgSQL module for PHP web programming language." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +DEPENDS="php php-mysql" 2.12 +WEB_SITE="http://www.php.net/" 2.13 +WANTED="php" 2.14 + 2.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.16 +genpkg_rules() 2.17 +{ 2.18 + mkdir -p $fs/usr/share/php 2.19 + cp $(find $_pkg | grep pdo_pgsql.so) $fs/usr/share/php/ 2.20 +} 2.21 + 2.22 +# Post and pre install commans to stop 2.23 +# and restart Web server if needed. 2.24 +pre_install() 2.25 +{ 2.26 + while read daemon file; do 2.27 + if [ -z "$1" -a -f "/var/run/$file" ]; then 2.28 + /etc/init.d/$daemon stop 2.29 + fi 2.30 + done <<EOT 2.31 +apache apache/httpd.pid 2.32 +lighttpd lighttpd.pid 2.33 +EOT 2.34 +} 2.35 + 2.36 +post_install() 2.37 +{ 2.38 + grep -q ^extension=pdo_pgsql.so $1/etc/php.ini || \ 2.39 + sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=pdo_pgsql.so|' -i $1/etc/php.ini 2.40 + # Start Web server. 2.41 + while read daemon file; do 2.42 + [ -z "$1" ] || continue 2.43 + if [ -z "$1" -a -f "/var/run/$file" ]; then 2.44 + /etc/init.d/$daemon stop 2.45 + sleep 2 2.46 + fi 2.47 + if [ -z "$1" -a -f /etc/init.d/$daemon ]; then 2.48 + /etc/init.d/$daemon start 2.49 + fi 2.50 + done <<EOT 2.51 +apache apache/httpd.pid 2.52 +lighttpd lighttpd.pid 2.53 +EOT 2.54 +} 2.55 + 2.56 +# Pre and post remove commands for Tazpkg. 2.57 +pre_remove() 2.58 +{ 2.59 + sed -i '/.*=pdo_pgsql.so.*/d' /etc/php.ini 2.60 + 2.61 + # Start Web server. 2.62 + while read daemon file; do 2.63 + if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then 2.64 + /etc/init.d/$daemon stop 2.65 + sleep 2 2.66 + /etc/init.d/$daemon start 2.67 + fi 2.68 + done <<EOT 2.69 +apache apache/httpd.pid 2.70 +lighttpd lighttpd.pid 2.71 +EOT 2.72 +}