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