wok-current annotate php-mcrypt/receipt @ rev 10169

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