wok annotate php-opcache/receipt @ rev 24650
updated htop (2.2.0 -> 3.1.2)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 10 16:26:13 2022 +0100 (2022-03-10) |
parents | b10d41313e54 |
children |
rev | line source |
---|---|
pascal@22389 | 1 # SliTaz package receipt. |
pascal@22389 | 2 |
pascal@22389 | 3 PACKAGE="php-opcache" |
Hans-G?nter@23426 | 4 VERSION="7.4.4" |
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 |
pascal@22389 | 11 DEPENDS="libmysqlclient php" |
Hans-G?nter@23426 | 12 WANTED="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 |
Hans-G?nter@23426 | 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 { |
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 |
pascal@22389 | 29 /etc/init.d/$daemon stop |
pascal@22389 | 30 fi |
Hans-G?nter@23426 | 31 done <<EOT |
pascal@22389 | 32 apache apache/httpd.pid |
pascal@22389 | 33 lighttpd lighttpd.pid |
pascal@22389 | 34 EOT |
pascal@22389 | 35 } |
pascal@22389 | 36 |
pascal@22389 | 37 post_install() |
pascal@22389 | 38 { |
Hans-G?nter@23426 | 39 grep -q ^extension=opcache.so "$1/etc/php.ini" || |
Hans-G?nter@23426 | 40 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=opcache.so|' \ |
Hans-G?nter@23426 | 41 -i "$1/etc/php.ini" |
Hans-G?nter@23426 | 42 |
pascal@22389 | 43 # Start Web server. |
Hans-G?nter@23426 | 44 while read daemon file |
Hans-G?nter@23426 | 45 do |
pascal@22389 | 46 [ -z "$1" ] || continue |
Hans-G?nter@23426 | 47 if [ -f "/var/run/$file" ] |
Hans-G?nter@23426 | 48 then |
pascal@22389 | 49 /etc/init.d/$daemon stop |
pascal@22389 | 50 sleep 2 |
pascal@22389 | 51 fi |
Hans-G?nter@23426 | 52 if [ -f /etc/init.d/$daemon ] |
Hans-G?nter@23426 | 53 then |
pascal@22389 | 54 /etc/init.d/$daemon start |
pascal@22389 | 55 fi |
Hans-G?nter@23426 | 56 done <<EOT |
pascal@22389 | 57 apache apache/httpd.pid |
pascal@22389 | 58 lighttpd lighttpd.pid |
pascal@22389 | 59 EOT |
pascal@22389 | 60 } |
pascal@22389 | 61 |
pascal@22389 | 62 # Pre and post remove commands for Tazpkg. |
pascal@22389 | 63 pre_remove() |
pascal@22389 | 64 { |
pascal@22389 | 65 sed -i '/.*=opcache.so.*/d' /etc/php.ini |
pascal@22389 | 66 |
pascal@22389 | 67 # Start Web server. |
Hans-G?nter@23426 | 68 while read daemon file |
Hans-G?nter@23426 | 69 do |
pascal@22389 | 70 [ -z "$1" ] || continue |
Hans-G?nter@23426 | 71 if [ -f "/var/run/$file" ] |
Hans-G?nter@23426 | 72 then |
pascal@22389 | 73 /etc/init.d/$daemon stop |
pascal@22389 | 74 sleep 2 |
pascal@22389 | 75 fi |
Hans-G?nter@23426 | 76 if [ -f /etc/init.d/$daemon ] |
Hans-G?nter@23426 | 77 then |
pascal@22389 | 78 /etc/init.d/$daemon start |
pascal@22389 | 79 fi |
Hans-G?nter@23426 | 80 done <<EOT |
pascal@22389 | 81 apache apache/httpd.pid |
pascal@22389 | 82 lighttpd lighttpd.pid |
pascal@22389 | 83 EOT |
pascal@22389 | 84 } |