wok-current annotate php-pdo-mysql/receipt @ rev 17751

gvim: add -ltinfo in LDFLAGS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 08 17:02:50 2015 +0100 (2015-03-08)
parents 76c1f14d1820
children 9e01bc6321ea
rev   line source
pankso@4428 1 # SliTaz package receipt.
pankso@4428 2
pankso@4428 3 PACKAGE="php-pdo-mysql"
erjo@16733 4 VERSION="5.5.13"
pankso@4428 5 CATEGORY="development"
pankso@4428 6 SHORT_DESC="PDO MySQL module for PHP web programming language."
pankso@4428 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 8 LICENSE="BSD"
pankso@4428 9 WEB_SITE="http://www.php.net/"
pankso@4428 10 WANTED="php"
pankso@4428 11
pascal@15198 12 DEPENDS="php php-mysql"
pascal@15198 13
pankso@4428 14 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@4428 15 genpkg_rules()
pankso@4428 16 {
pankso@4428 17 mkdir -p $fs/usr/share/php
slaxemulator@14614 18 cp $(find $install | grep pdo_mysql.so) $fs/usr/share/php/
pankso@4428 19 }
pankso@4428 20
pankso@4428 21 # Post and pre install commans to stop
pankso@4428 22 # and restart Web server if needed.
pankso@4428 23 pre_install()
pankso@4428 24 {
pankso@4428 25 while read daemon file; do
pankso@4428 26 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 27 /etc/init.d/$daemon stop
pankso@4428 28 fi
pankso@4428 29 done <<EOT
pankso@4428 30 apache apache/httpd.pid
pankso@4428 31 lighttpd lighttpd.pid
pankso@4428 32 EOT
pankso@4428 33 }
pankso@4428 34
pankso@4428 35 post_install()
pankso@4428 36 {
pankso@4428 37 grep -q ^extension=pdo_mysql.so $1/etc/php.ini || \
pascal@4923 38 sed -e 's|extension=msql.so|extension=msql.so\nextension=pdo_mysql.so|' -i $1/etc/php.ini
pankso@4428 39 # Start Web server.
pankso@4428 40 while read daemon file; do
pankso@4428 41 [ -z "$1" ] || continue
pankso@4428 42 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 43 /etc/init.d/$daemon stop
pankso@4428 44 sleep 2
pankso@4428 45 fi
pankso@4428 46 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pankso@4428 47 /etc/init.d/$daemon start
pankso@4428 48 fi
pankso@4428 49 done <<EOT
pankso@4428 50 apache apache/httpd.pid
pankso@4428 51 lighttpd lighttpd.pid
pankso@4428 52 EOT
pankso@4428 53 }
pankso@4428 54
pankso@4428 55 # Pre and post remove commands for Tazpkg.
pankso@4428 56 pre_remove()
pankso@4428 57 {
pankso@4428 58 sed -i '/.*=pdo_mysql.so.*/d' /etc/php.ini
pankso@4428 59
pankso@4428 60 # Start Web server.
pankso@4428 61 while read daemon file; do
slaxemulator@14614 62 [ -z "$1" ] || continue
slaxemulator@14614 63 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@4428 64 /etc/init.d/$daemon stop
pankso@4428 65 sleep 2
slaxemulator@14614 66 fi
slaxemulator@14614 67 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pankso@4428 68 /etc/init.d/$daemon start
pankso@4428 69 fi
pankso@4428 70 done <<EOT
pankso@4428 71 apache apache/httpd.pid
pankso@4428 72 lighttpd lighttpd.pid
pankso@4428 73 EOT
pankso@4428 74 }