wok annotate php-snmp/receipt @ rev 21947
updated spl (0.7.7 -> 0.7.13)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Oct 08 17:14:12 2019 +0100 (2019-10-08) |
parents | 9e01bc6321ea |
children | 84a3b4b621e1 |
rev | line source |
---|---|
pascal@3230 | 1 # SliTaz package receipt. |
pascal@3230 | 2 |
pascal@3230 | 3 PACKAGE="php-snmp" |
erjo@16733 | 4 VERSION="5.5.13" |
pascal@3230 | 5 CATEGORY="development" |
pascal@3230 | 6 SHORT_DESC="snmp module for PHP web programming language." |
pascal@3230 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 8 LICENSE="BSD" |
pascal@21278 | 9 WEB_SITE="https://www.php.net/" |
pascal@3230 | 10 WANTED="php" |
pascal@3230 | 11 |
pascal@15198 | 12 DEPENDS="net-snmp php libcrypto" |
pascal@15198 | 13 |
pascal@3230 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@3230 | 15 genpkg_rules() |
pascal@3230 | 16 { |
pascal@3230 | 17 mkdir -p $fs/usr/share/php |
slaxemulator@14614 | 18 cp $(find $install | grep snmp.so) $fs/usr/share/php/ |
pascal@3230 | 19 } |
pascal@3230 | 20 |
pascal@3230 | 21 # Post and pre install commans to stop |
pascal@3230 | 22 # and restart Web server if needed. |
pascal@3230 | 23 pre_install() |
pascal@3230 | 24 { |
pascal@3230 | 25 while read daemon file; do |
pascal@3230 | 26 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@3230 | 27 /etc/init.d/$daemon stop |
pascal@3230 | 28 fi |
pascal@3230 | 29 done <<EOT |
pascal@3230 | 30 apache apache/httpd.pid |
pascal@3230 | 31 lighttpd lighttpd.pid |
pascal@3230 | 32 EOT |
pascal@3230 | 33 } |
pascal@3230 | 34 |
pascal@3230 | 35 post_install() |
pascal@3230 | 36 { |
pascal@18730 | 37 grep -q ^extension=snmp.so "$1/etc/php.ini" || \ |
pascal@18730 | 38 sed -e 's|extension=msql.so|extension=msql.so\nextension=snmp.so|' -i "$1/etc/php.ini" |
pascal@3230 | 39 # Start Web server. |
pascal@3230 | 40 while read daemon file; do |
pascal@3230 | 41 [ -z "$1" ] || continue |
pascal@3230 | 42 if [ -f "/var/run/$file" ]; then |
pascal@3230 | 43 /etc/init.d/$daemon stop |
pascal@3230 | 44 sleep 2 |
pascal@3230 | 45 fi |
pascal@3230 | 46 if [ -f /etc/init.d/$daemon ]; then |
pascal@3230 | 47 /etc/init.d/$daemon start |
pascal@3230 | 48 fi |
pascal@3230 | 49 done <<EOT |
pascal@3230 | 50 apache apache/httpd.pid |
pascal@3230 | 51 lighttpd lighttpd.pid |
pascal@3230 | 52 EOT |
pascal@3230 | 53 } |
pascal@3230 | 54 |
pascal@3230 | 55 # Pre and post remove commands for Tazpkg. |
pascal@3230 | 56 pre_remove() |
pascal@3230 | 57 { |
pascal@3230 | 58 sed -i '/.*=snmp.so.*/d' /etc/php.ini |
pascal@3230 | 59 |
pascal@3230 | 60 # Start Web server. |
pascal@3230 | 61 while read daemon file; do |
slaxemulator@14614 | 62 [ -z "$1" ] || continue |
slaxemulator@14614 | 63 if [ -f "/var/run/$file" ]; then |
pascal@3230 | 64 /etc/init.d/$daemon stop |
pascal@3230 | 65 sleep 2 |
slaxemulator@14614 | 66 fi |
slaxemulator@14614 | 67 if [ -f /etc/init.d/$daemon ]; then |
pascal@3230 | 68 /etc/init.d/$daemon start |
pascal@3230 | 69 fi |
pascal@3230 | 70 done <<EOT |
pascal@3230 | 71 apache apache/httpd.pid |
pascal@3230 | 72 lighttpd lighttpd.pid |
pascal@3230 | 73 EOT |
pascal@3230 | 74 } |