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