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