wok annotate php-curl/receipt @ rev 23193

Up php (7.3.16) CVE-2020-7064/7065/7066
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 20 15:21:15 2020 +0100 (2020-03-20)
parents 88fd80eaee1a
children bcea19bfa7af
rev   line source
jozee@5521 1 # SliTaz package receipt.
jozee@5521 2
jozee@5521 3 PACKAGE="php-curl"
pascal@23193 4 VERSION="7.3.16"
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 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 {
pascal@18730 37 grep -q ^extension=curl.so "$1/etc/php.ini" || \
pascal@22389 38 sed -e 's|extension=bz2.so|extension=bz2.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 }