wok-6.x rev 3230
Add php-snmp
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 29 16:44:01 2009 +0200 (2009-05-29) |
parents | 4cd615959f41 |
children | 88767c8c53a3 |
files | php-snmp/receipt php/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-snmp/receipt Fri May 29 16:44:01 2009 +0200 1.3 @@ -0,0 +1,69 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-snmp" 1.7 +VERSION="5.2.9" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="snmp module for PHP web programming language." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +DEPENDS="net-snmp php libcrypto" 1.12 +WEB_SITE="http://www.php.net/" 1.13 +WANTED="php" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/share/php 1.19 + cp $(find $_pkg | grep snmp.so) $fs/usr/share/php/ 1.20 +} 1.21 + 1.22 +# Post and pre install commans to stop 1.23 +# and restart Web server if needed. 1.24 +pre_install() 1.25 +{ 1.26 + while read daemon file; do 1.27 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.28 + /etc/init.d/$daemon stop 1.29 + fi 1.30 + done <<EOT 1.31 +apache apache/httpd.pid 1.32 +lighttpd lighttpd.pid 1.33 +EOT 1.34 +} 1.35 + 1.36 +post_install() 1.37 +{ 1.38 + grep -q ^extension=snmp.so $1/etc/php.ini || \ 1.39 + sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=snmp.so|' -i $1/etc/php.ini 1.40 + # Start Web server. 1.41 + while read daemon file; do 1.42 + [ -z "$1" ] || continue 1.43 + if [ -f "/var/run/$file" ]; then 1.44 + /etc/init.d/$daemon stop 1.45 + sleep 2 1.46 + fi 1.47 + if [ -f /etc/init.d/$daemon ]; then 1.48 + /etc/init.d/$daemon start 1.49 + fi 1.50 + done <<EOT 1.51 +apache apache/httpd.pid 1.52 +lighttpd lighttpd.pid 1.53 +EOT 1.54 +} 1.55 + 1.56 +# Pre and post remove commands for Tazpkg. 1.57 +pre_remove() 1.58 +{ 1.59 + sed -i '/.*=snmp.so.*/d' /etc/php.ini 1.60 + 1.61 + # Start Web server. 1.62 + while read daemon file; do 1.63 + if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then 1.64 + /etc/init.d/$daemon stop 1.65 + sleep 2 1.66 + /etc/init.d/$daemon start 1.67 + fi 1.68 + done <<EOT 1.69 +apache apache/httpd.pid 1.70 +lighttpd lighttpd.pid 1.71 +EOT 1.72 +}
2.1 --- a/php/receipt Fri May 29 18:51:27 2009 +0000 2.2 +++ b/php/receipt Fri May 29 16:44:01 2009 +0200 2.3 @@ -6,7 +6,7 @@ 2.4 SHORT_DESC="PHP web programming language." 2.5 MAINTAINER="pankso@slitaz.org" 2.6 DEPENDS="php-common lighttpd zlib libxml2 sqlite" 2.7 -BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev \ 2.8 +BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev net-snmp-dev \ 2.9 postgresql postgresql-dev gettext openssl-dev apache-dev apache apr-util-dev \ 2.10 c-client mhash mhash-dev libpng libpng-dev unixODBC-dev openldap-dev libldap apr-dev" 2.11 TARBALL="$PACKAGE-$VERSION.tar.bz2" 2.12 @@ -32,6 +32,7 @@ 2.13 --with-gettext \ 2.14 --with-mysql=shared,/usr \ 2.15 --with-pgsql=shared,/usr \ 2.16 +--with-snmp=shared,/usr \ 2.17 --with-ldap=shared \ 2.18 --with-imap=shared --with-imap-ssl \ 2.19 --with-mhash=shared \