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