wok-next annotate php-curl/receipt @ rev 18393

Add: WIP open-vm-tools kernel modules
author Nathan Neulinger <nneul@neulinger.org>
date Fri Sep 18 23:51:57 2015 +0000 (2015-09-18)
parents 76c1f14d1820
children 9e01bc6321ea
rev   line source
jozee@5521 1 # SliTaz package receipt.
jozee@5521 2
jozee@5521 3 PACKAGE="php-curl"
erjo@16733 4 VERSION="5.5.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"
pascal@15198 8 LICENSE="BSD"
jozee@5521 9 WEB_SITE="http://www.php.net/"
jozee@5521 10 WANTED="php"
jozee@5521 11
pascal@15198 12 DEPENDS="curl 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
slaxemulator@14614 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 {
jozee@5521 25 while read daemon file; do
jozee@5521 26 if [ -z "$1" -a -f "/var/run/$file" ]; then
jozee@5521 27 /etc/init.d/$daemon stop
jozee@5521 28 fi
jozee@5521 29 done <<EOT
jozee@5521 30 apache apache/httpd.pid
jozee@5521 31 lighttpd lighttpd.pid
jozee@5521 32 EOT
jozee@5521 33 }
jozee@5521 34
jozee@5521 35 post_install()
jozee@5521 36 {
jozee@5521 37 grep -q ^extension=curl.so $1/etc/php.ini || \
jozee@5521 38 sed -e 's|extension=msql.so|extension=msql.so\nextension=curl.so|' -i $1/etc/php.ini
jozee@5521 39 # Start Web server.
jozee@5521 40 while read daemon file; do
jozee@5521 41 [ -z "$1" ] || continue
jozee@5521 42 if [ -f "/var/run/$file" ]; then
jozee@5521 43 /etc/init.d/$daemon stop
jozee@5521 44 sleep 2
jozee@5521 45 fi
jozee@5521 46 if [ -f /etc/init.d/$daemon ]; then
jozee@5521 47 /etc/init.d/$daemon start
jozee@5521 48 fi
jozee@5521 49 done <<EOT
jozee@5521 50 apache apache/httpd.pid
jozee@5521 51 lighttpd lighttpd.pid
jozee@5521 52 EOT
jozee@5521 53 }
jozee@5521 54
jozee@5521 55 # Pre and post remove commands for Tazpkg.
jozee@5521 56 pre_remove()
jozee@5521 57 {
jozee@5521 58 sed -i '/.*=curl.so.*/d' /etc/php.ini
jozee@5521 59
jozee@5521 60 # Start Web server.
jozee@5521 61 while read daemon file; do
slaxemulator@14614 62 [ -z "$1" ] || continue
slaxemulator@14614 63 if [ -f "/var/run/$file" ]; then
jozee@5521 64 /etc/init.d/$daemon stop
jozee@5521 65 sleep 2
slaxemulator@14614 66 fi
slaxemulator@14614 67 if [ -f /etc/init.d/$daemon ]; then
jozee@5521 68 /etc/init.d/$daemon start
jozee@5521 69 fi
jozee@5521 70 done <<EOT
jozee@5521 71 apache apache/httpd.pid
jozee@5521 72 lighttpd lighttpd.pid
jozee@5521 73 EOT
jozee@5521 74 }