wok annotate php-ldap/receipt @ rev 1739
Up transmission (1.40)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 22 11:16:35 2008 +0000 (2008-11-22) |
parents | 41897da4a1db |
children | 8294794b7a81 |
rev | line source |
---|---|
pascal@1155 | 1 # SliTaz package receipt. |
pascal@1155 | 2 |
pascal@1155 | 3 PACKAGE="php-ldap" |
pascal@1155 | 4 VERSION="5.2.5" |
pascal@1155 | 5 CATEGORY="development" |
pascal@1155 | 6 SHORT_DESC="ldap module for PHP web programming language." |
pascal@1155 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1585 | 8 DEPENDS="libldap php openssl cyrus-sasl" |
pascal@1155 | 9 WEB_SITE="http://www.php.net/" |
pascal@1155 | 10 WANTED="php" |
pascal@1155 | 11 |
pascal@1155 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1155 | 13 genpkg_rules() |
pascal@1155 | 14 { |
pascal@1155 | 15 mkdir -p $fs/usr/share/php |
pascal@1155 | 16 cp $(find $_pkg | grep ldap.so) $fs/usr/share/php/ |
pascal@1155 | 17 } |
pascal@1155 | 18 |
pascal@1155 | 19 # Post and pre install commans to stop |
pascal@1155 | 20 # and restart Web server if needed. |
pascal@1155 | 21 pre_install() |
pascal@1155 | 22 { |
pascal@1315 | 23 while read daemon file; do |
pascal@1315 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@1315 | 25 /etc/init.d/$daemon stop |
pascal@1315 | 26 fi |
pascal@1315 | 27 done <<EOT |
pascal@1315 | 28 apache apache/httpd.pid |
pascal@1315 | 29 lighttpd lighttpd.pid |
pascal@1315 | 30 EOT |
pascal@1155 | 31 } |
pascal@1155 | 32 |
pascal@1155 | 33 post_install() |
pascal@1155 | 34 { |
pascal@1155 | 35 grep -q ^extension=msql.so $1/etc/php.ini || \ |
pascal@1155 | 36 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=ldap.so|' -i $1/etc/php.ini |
pascal@1155 | 37 # Start Web server. |
pascal@1315 | 38 while read daemon file; do |
pascal@1315 | 39 if [ -z "$1" -a -f /etc/init.d/$daemon \ |
pascal@1315 | 40 -a ! -f "/var/run/$file" ]; then |
pascal@1315 | 41 /etc/init.d/$daemon start |
pascal@1315 | 42 fi |
pascal@1315 | 43 done <<EOT |
pascal@1315 | 44 apache apache/httpd.pid |
pascal@1315 | 45 lighttpd lighttpd.pid |
pascal@1315 | 46 EOT |
pascal@1155 | 47 } |
pascal@1155 | 48 |