wok-next annotate php-curl/receipt @ rev 12180
Up: slitaz-configs (4.8.4) - Fix clock position
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Mar 24 16:20:35 2012 +0100 (2012-03-24) |
parents | ed560df8d2fc |
children | 855f42b596c0 |
rev | line source |
---|---|
jozee@5521 | 1 # SliTaz package receipt. |
jozee@5521 | 2 |
jozee@5521 | 3 PACKAGE="php-curl" |
slaxemulator@7925 | 4 VERSION="5.2.17" |
jozee@5521 | 5 CATEGORY="development" |
jozee@5521 | 6 SHORT_DESC="curl module for PHP web programming language." |
jozee@5521 | 7 MAINTAINER="jozee@slitaz.org" |
jozee@5521 | 8 DEPENDS="curl php" |
jozee@5521 | 9 WEB_SITE="http://www.php.net/" |
jozee@5521 | 10 WANTED="php" |
jozee@5521 | 11 |
jozee@5521 | 12 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@5521 | 13 genpkg_rules() |
jozee@5521 | 14 { |
jozee@5521 | 15 mkdir -p $fs/usr/share/php |
jozee@5521 | 16 cp $(find $_pkg | grep curl.so) $fs/usr/share/php/ |
jozee@5521 | 17 } |
jozee@5521 | 18 |
jozee@5521 | 19 # Post and pre install commans to stop |
jozee@5521 | 20 # and restart Web server if needed. |
jozee@5521 | 21 pre_install() |
jozee@5521 | 22 { |
jozee@5521 | 23 while read daemon file; do |
jozee@5521 | 24 if [ -z "$1" -a -f "/var/run/$file" ]; then |
jozee@5521 | 25 /etc/init.d/$daemon stop |
jozee@5521 | 26 fi |
jozee@5521 | 27 done <<EOT |
jozee@5521 | 28 apache apache/httpd.pid |
jozee@5521 | 29 lighttpd lighttpd.pid |
jozee@5521 | 30 EOT |
jozee@5521 | 31 } |
jozee@5521 | 32 |
jozee@5521 | 33 post_install() |
jozee@5521 | 34 { |
jozee@5521 | 35 grep -q ^extension=curl.so $1/etc/php.ini || \ |
jozee@5521 | 36 sed -e 's|extension=msql.so|extension=msql.so\nextension=curl.so|' -i $1/etc/php.ini |
jozee@5521 | 37 # Start Web server. |
jozee@5521 | 38 while read daemon file; do |
jozee@5521 | 39 [ -z "$1" ] || continue |
jozee@5521 | 40 if [ -f "/var/run/$file" ]; then |
jozee@5521 | 41 /etc/init.d/$daemon stop |
jozee@5521 | 42 sleep 2 |
jozee@5521 | 43 fi |
jozee@5521 | 44 if [ -f /etc/init.d/$daemon ]; then |
jozee@5521 | 45 /etc/init.d/$daemon start |
jozee@5521 | 46 fi |
jozee@5521 | 47 done <<EOT |
jozee@5521 | 48 apache apache/httpd.pid |
jozee@5521 | 49 lighttpd lighttpd.pid |
jozee@5521 | 50 EOT |
jozee@5521 | 51 } |
jozee@5521 | 52 |
jozee@5521 | 53 # Pre and post remove commands for Tazpkg. |
jozee@5521 | 54 pre_remove() |
jozee@5521 | 55 { |
jozee@5521 | 56 sed -i '/.*=curl.so.*/d' /etc/php.ini |
jozee@5521 | 57 |
jozee@5521 | 58 # Start Web server. |
jozee@5521 | 59 while read daemon file; do |
jozee@5521 | 60 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
jozee@5521 | 61 /etc/init.d/$daemon stop |
jozee@5521 | 62 sleep 2 |
jozee@5521 | 63 /etc/init.d/$daemon start |
jozee@5521 | 64 fi |
jozee@5521 | 65 done <<EOT |
jozee@5521 | 66 apache apache/httpd.pid |
jozee@5521 | 67 lighttpd lighttpd.pid |
jozee@5521 | 68 EOT |
jozee@5521 | 69 } |