wok annotate php-openssl/receipt @ rev 7362
mirror-tools/mkcfg.sh: create direct pxe links
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 23 18:57:25 2010 +0100 (2010-11-23) |
parents | be154d2d3d27 |
children | 79688ff060bd |
rev | line source |
---|---|
erjo@2671 | 1 # SliTaz package receipt. |
erjo@2671 | 2 |
erjo@2671 | 3 PACKAGE="php-openssl" |
slaxemulator@6569 | 4 VERSION="5.2.14" |
erjo@2671 | 5 CATEGORY="development" |
erjo@2671 | 6 SHORT_DESC="Openssl module for PHP web programming language." |
erjo@2671 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
erjo@2671 | 8 DEPENDS="php openssl" |
erjo@2671 | 9 WEB_SITE="http://www.php.net/" |
erjo@2671 | 10 WANTED="php" |
erjo@2671 | 11 |
erjo@2671 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2671 | 13 genpkg_rules() |
erjo@2671 | 14 { |
erjo@2671 | 15 mkdir -p $fs/usr/share/php |
erjo@2671 | 16 cp $(find $_pkg | grep openssl.so) $fs/usr/share/php/ |
erjo@2671 | 17 } |
erjo@2671 | 18 |
erjo@2671 | 19 # Post and pre install commans to stop |
erjo@2671 | 20 # and restart Web server if needed. |
erjo@2671 | 21 pre_install() |
erjo@2671 | 22 { |
erjo@2671 | 23 while read daemon file; do |
erjo@2671 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
erjo@2671 | 25 /etc/init.d/$daemon stop |
erjo@2671 | 26 fi |
erjo@2671 | 27 done <<EOT |
erjo@2671 | 28 apache apache/httpd.pid |
erjo@2671 | 29 lighttpd lighttpd.pid |
erjo@2671 | 30 EOT |
erjo@2671 | 31 } |
erjo@2671 | 32 |
erjo@2671 | 33 post_install() |
erjo@2671 | 34 { |
erjo@2671 | 35 grep -q ^extension=openssl.so $1/etc/php.ini || \ |
pascal@4923 | 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=openssl.so|' -i $1/etc/php.ini |
erjo@2671 | 37 # Start Web server. |
erjo@2671 | 38 while read daemon file; do |
erjo@2671 | 39 [ -z "$1" ] || continue |
erjo@2671 | 40 if [ -f "/var/run/$file" ]; then |
erjo@2671 | 41 /etc/init.d/$daemon stop |
erjo@2671 | 42 sleep 2 |
erjo@2671 | 43 fi |
erjo@2671 | 44 if [ -f /etc/init.d/$daemon ]; then |
erjo@2671 | 45 /etc/init.d/$daemon start |
erjo@2671 | 46 fi |
erjo@2671 | 47 done <<EOT |
erjo@2671 | 48 apache apache/httpd.pid |
erjo@2671 | 49 lighttpd lighttpd.pid |
erjo@2671 | 50 EOT |
erjo@2671 | 51 } |
erjo@2671 | 52 |
erjo@2671 | 53 # Pre and post remove commands for Tazpkg. |
erjo@2671 | 54 pre_remove() |
erjo@2671 | 55 { |
erjo@2671 | 56 sed -i '/.*=openssl.so.*/d' /etc/php.ini |
erjo@2671 | 57 |
erjo@2671 | 58 # Start Web server. |
erjo@2671 | 59 while read daemon file; do |
erjo@2671 | 60 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
erjo@2671 | 61 /etc/init.d/$daemon stop |
erjo@2671 | 62 sleep 2 |
erjo@2671 | 63 /etc/init.d/$daemon start |
erjo@2671 | 64 fi |
erjo@2671 | 65 done <<EOT |
erjo@2671 | 66 apache apache/httpd.pid |
erjo@2671 | 67 lighttpd lighttpd.pid |
erjo@2671 | 68 EOT |
erjo@2671 | 69 } |