wok-next annotate php-openssl/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@2671 1 # SliTaz package receipt.
erjo@2671 2
erjo@2671 3 PACKAGE="php-openssl"
slaxemulator@14614 4 VERSION="5.4.13"
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
slaxemulator@14614 16 cp $(find $install | 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
slaxemulator@14614 60 [ -z "$1" ] || continue
slaxemulator@14614 61 if [ -f "/var/run/$file" ]; then
erjo@2671 62 /etc/init.d/$daemon stop
erjo@2671 63 sleep 2
slaxemulator@14614 64 fi
slaxemulator@14614 65 if [ -f /etc/init.d/$daemon ]; then
erjo@2671 66 /etc/init.d/$daemon start
erjo@2671 67 fi
erjo@2671 68 done <<EOT
erjo@2671 69 apache apache/httpd.pid
erjo@2671 70 lighttpd lighttpd.pid
erjo@2671 71 EOT
erjo@2671 72 }