wok-next annotate php-mcrypt/receipt @ rev 14614
Up: php to 5.4.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Jun 01 06:40:14 2013 +0000 (2013-06-01) |
parents | 855f42b596c0 |
children | 78cb1e930abd |
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" |
slaxemulator@14614 | 8 DEPENDS="libmcrypt php libtool" |
erjo@4408 | 9 WEB_SITE="http://www.php.net/" |
erjo@4408 | 10 WANTED="php" |
erjo@4408 | 11 |
erjo@4408 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@4408 | 13 genpkg_rules() |
erjo@4408 | 14 { |
erjo@4408 | 15 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 16 cp $(find $install | grep mcrypt.so) $fs/usr/share/php/ |
erjo@4408 | 17 } |
erjo@4408 | 18 |
erjo@4408 | 19 # Post and pre install commans to stop |
erjo@4408 | 20 # and restart Web server if needed. |
erjo@4408 | 21 pre_install() |
erjo@4408 | 22 { |
erjo@4408 | 23 while read daemon file; do |
erjo@4408 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
erjo@4408 | 25 /etc/init.d/$daemon stop |
erjo@4408 | 26 fi |
erjo@4408 | 27 done <<EOT |
erjo@4408 | 28 apache apache/httpd.pid |
erjo@4408 | 29 lighttpd lighttpd.pid |
erjo@4408 | 30 EOT |
erjo@4408 | 31 } |
erjo@4408 | 32 |
erjo@4408 | 33 post_install() |
erjo@4408 | 34 { |
pascal@4921 | 35 grep -q ^extension=mcrypt.so $1/etc/php.ini || \ |
pascal@4923 | 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=mcrypt.so|' -i $1/etc/php.ini |
erjo@4408 | 37 # Start Web server. |
erjo@4408 | 38 while read daemon file; do |
erjo@4408 | 39 [ -z "$1" ] || continue |
erjo@4408 | 40 if [ -f "/var/run/$file" ]; then |
erjo@4408 | 41 /etc/init.d/$daemon stop |
erjo@4408 | 42 sleep 2 |
erjo@4408 | 43 fi |
erjo@4408 | 44 if [ -f /etc/init.d/$daemon ]; then |
erjo@4408 | 45 /etc/init.d/$daemon start |
erjo@4408 | 46 fi |
erjo@4408 | 47 done <<EOT |
erjo@4408 | 48 apache apache/httpd.pid |
erjo@4408 | 49 lighttpd lighttpd.pid |
erjo@4408 | 50 EOT |
erjo@4408 | 51 } |
erjo@4408 | 52 |
erjo@4408 | 53 # Pre and post remove commands for Tazpkg. |
erjo@4408 | 54 pre_remove() |
erjo@4408 | 55 { |
erjo@4408 | 56 sed -i '/.*=mcrypt.so.*/d' /etc/php.ini |
erjo@4408 | 57 |
erjo@4408 | 58 # Start Web server. |
erjo@4408 | 59 while read daemon file; do |
slaxemulator@14614 | 60 [ -z "$1" ] || continue |
slaxemulator@14614 | 61 if [ -f "/var/run/$file" ]; then |
erjo@4408 | 62 /etc/init.d/$daemon stop |
erjo@4408 | 63 sleep 2 |
slaxemulator@14614 | 64 fi |
slaxemulator@14614 | 65 if [ -f /etc/init.d/$daemon ]; then |
erjo@4408 | 66 /etc/init.d/$daemon start |
erjo@4408 | 67 fi |
erjo@4408 | 68 done <<EOT |
erjo@4408 | 69 apache apache/httpd.pid |
erjo@4408 | 70 lighttpd lighttpd.pid |
erjo@4408 | 71 EOT |
erjo@4408 | 72 } |