wok annotate php-mysqli/receipt @ rev 14863

Up: libsmpeg* (399)
author Claudinei Pereira <claudinei@slitaz.org>
date Mon Jul 22 19:41:27 2013 -0300 (2013-07-22)
parents 855f42b596c0
children 78cb1e930abd
rev   line source
pankso@11658 1 # SliTaz package receipt.
pankso@11658 2
pankso@11658 3 PACKAGE="php-mysqli"
slaxemulator@14614 4 VERSION="5.4.13"
pankso@11658 5 CATEGORY="development"
pankso@11658 6 SHORT_DESC="mysqli module for PHP web programming language."
pankso@11658 7 MAINTAINER="pascal.bellard@slitaz.org"
pankso@11658 8 DEPENDS="libmysqlclient php"
pankso@11658 9 WEB_SITE="http://www.php.net/"
pankso@11658 10 WANTED="php"
pankso@11658 11
pankso@11658 12 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@11658 13 genpkg_rules()
pankso@11658 14 {
pankso@11658 15 mkdir -p $fs/usr/share/php
pankso@11658 16 cp $(find $install | grep mysqli.so) $fs/usr/share/php/
pankso@11658 17 }
pankso@11658 18
pankso@11658 19 # Post and pre install commans to stop
pankso@11658 20 # and restart Web server if needed.
pankso@11658 21 pre_install()
pankso@11658 22 {
pankso@11658 23 while read daemon file; do
pankso@11658 24 if [ -z "$1" -a -f "/var/run/$file" ]; then
pankso@11658 25 /etc/init.d/$daemon stop
pankso@11658 26 fi
pankso@11658 27 done <<EOT
pankso@11658 28 apache apache/httpd.pid
pankso@11658 29 lighttpd lighttpd.pid
pankso@11658 30 EOT
pankso@11658 31 }
pankso@11658 32
pankso@11658 33 post_install()
pankso@11658 34 {
pankso@11658 35 grep -q ^extension=mysqli.so $1/etc/php.ini || \
pankso@11658 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=mysqli.so|' -i $1/etc/php.ini
pankso@11658 37 # Start Web server.
pankso@11658 38 while read daemon file; do
pankso@11658 39 [ -z "$1" ] || continue
pankso@11658 40 if [ -f "/var/run/$file" ]; then
pankso@11658 41 /etc/init.d/$daemon stop
pankso@11658 42 sleep 2
pankso@11658 43 fi
pankso@11658 44 if [ -f /etc/init.d/$daemon ]; then
pankso@11658 45 /etc/init.d/$daemon start
pankso@11658 46 fi
pankso@11658 47 done <<EOT
pankso@11658 48 apache apache/httpd.pid
pankso@11658 49 lighttpd lighttpd.pid
pankso@11658 50 EOT
pankso@11658 51 }
pankso@11658 52
pankso@11658 53 # Pre and post remove commands for Tazpkg.
pankso@11658 54 pre_remove()
pankso@11658 55 {
pankso@11658 56 sed -i '/.*=mysqli.so.*/d' /etc/php.ini
pankso@11658 57
pankso@11658 58 # Start Web server.
pankso@11658 59 while read daemon file; do
slaxemulator@14614 60 [ -z "$1" ] || continue
slaxemulator@14614 61 if [ -f "/var/run/$file" ]; then
pankso@11658 62 /etc/init.d/$daemon stop
pankso@11658 63 sleep 2
slaxemulator@14614 64 fi
slaxemulator@14614 65 if [ -f /etc/init.d/$daemon ]; then
pankso@11658 66 /etc/init.d/$daemon start
pankso@11658 67 fi
pankso@11658 68 done <<EOT
pankso@11658 69 apache apache/httpd.pid
pankso@11658 70 lighttpd lighttpd.pid
pankso@11658 71 EOT
pankso@11658 72 }