wok-current annotate php-curl/receipt @ rev 14945
Up: edje (1.7.8)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Aug 08 19:15:50 2013 +0200 (2013-08-08) |
parents | 855f42b596c0 |
children | 78cb1e930abd |
rev | line source |
---|---|
jozee@5521 | 1 # SliTaz package receipt. |
jozee@5521 | 2 |
jozee@5521 | 3 PACKAGE="php-curl" |
slaxemulator@14614 | 4 VERSION="5.4.13" |
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 |
slaxemulator@14614 | 16 cp $(find $install | 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 |
slaxemulator@14614 | 60 [ -z "$1" ] || continue |
slaxemulator@14614 | 61 if [ -f "/var/run/$file" ]; then |
jozee@5521 | 62 /etc/init.d/$daemon stop |
jozee@5521 | 63 sleep 2 |
slaxemulator@14614 | 64 fi |
slaxemulator@14614 | 65 if [ -f /etc/init.d/$daemon ]; then |
jozee@5521 | 66 /etc/init.d/$daemon start |
jozee@5521 | 67 fi |
jozee@5521 | 68 done <<EOT |
jozee@5521 | 69 apache apache/httpd.pid |
jozee@5521 | 70 lighttpd lighttpd.pid |
jozee@5521 | 71 EOT |
jozee@5521 | 72 } |