wok-current annotate php-openssl/receipt @ rev 15729

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