wok-6.x annotate php-openssl/receipt @ rev 24533

updated f3 (7.2 -> 8.0)
author Hans-G?nter Theisgen
date Wed Feb 23 11:14:10 2022 +0100 (2022-02-23)
parents b10d41313e54
children
rev   line source
erjo@2671 1 # SliTaz package receipt.
erjo@2671 2
erjo@2671 3 PACKAGE="php-openssl"
Hans-G?nter@23426 4 VERSION="7.4.4"
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"
pascal@21278 9 WEB_SITE="https://www.php.net/"
erjo@2671 10
pascal@15198 11 DEPENDS="php openssl"
Hans-G?nter@23426 12 WANTED="php"
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
Hans-G?nter@23426 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 {
Hans-G?nter@23426 25 while read daemon file
Hans-G?nter@23426 26 do
Hans-G?nter@23426 27 if [ -z "$1" -a -f "/var/run/$file" ]
Hans-G?nter@23426 28 then
erjo@2671 29 /etc/init.d/$daemon stop
erjo@2671 30 fi
Hans-G?nter@23426 31 done <<EOT
erjo@2671 32 apache apache/httpd.pid
erjo@2671 33 lighttpd lighttpd.pid
erjo@2671 34 EOT
erjo@2671 35 }
erjo@2671 36
erjo@2671 37 post_install()
erjo@2671 38 {
Hans-G?nter@23426 39 grep -q ^extension=openssl.so "$1/etc/php.ini" ||
Hans-G?nter@23426 40 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=openssl.so|' \
Hans-G?nter@23426 41 -i "$1/etc/php.ini"
Hans-G?nter@23426 42
erjo@2671 43 # Start Web server.
Hans-G?nter@23426 44 while read daemon file
Hans-G?nter@23426 45 do
erjo@2671 46 [ -z "$1" ] || continue
Hans-G?nter@23426 47 if [ -f "/var/run/$file" ]
Hans-G?nter@23426 48 then
erjo@2671 49 /etc/init.d/$daemon stop
erjo@2671 50 sleep 2
erjo@2671 51 fi
Hans-G?nter@23426 52 if [ -f /etc/init.d/$daemon ]
Hans-G?nter@23426 53 then
erjo@2671 54 /etc/init.d/$daemon start
erjo@2671 55 fi
Hans-G?nter@23426 56 done <<EOT
erjo@2671 57 apache apache/httpd.pid
erjo@2671 58 lighttpd lighttpd.pid
erjo@2671 59 EOT
erjo@2671 60 }
erjo@2671 61
erjo@2671 62 # Pre and post remove commands for Tazpkg.
erjo@2671 63 pre_remove()
erjo@2671 64 {
erjo@2671 65 sed -i '/.*=openssl.so.*/d' /etc/php.ini
erjo@2671 66
erjo@2671 67 # Start Web server.
Hans-G?nter@23426 68 while read daemon file
Hans-G?nter@23426 69 do
slaxemulator@14614 70 [ -z "$1" ] || continue
Hans-G?nter@23426 71 if [ -f "/var/run/$file" ]
Hans-G?nter@23426 72 then
erjo@2671 73 /etc/init.d/$daemon stop
erjo@2671 74 sleep 2
slaxemulator@14614 75 fi
Hans-G?nter@23426 76 if [ -f /etc/init.d/$daemon ]
Hans-G?nter@23426 77 then
erjo@2671 78 /etc/init.d/$daemon start
erjo@2671 79 fi
Hans-G?nter@23426 80 done <<EOT
erjo@2671 81 apache apache/httpd.pid
erjo@2671 82 lighttpd lighttpd.pid
erjo@2671 83 EOT
erjo@2671 84 }