wok-current rev 25772
Add php56-opcache
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun May 11 19:22:45 2025 +0000 (4 months ago) |
parents | 9eaca107a6db |
children | 7b06593b8393 |
files | php56-opcache/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php56-opcache/receipt Sun May 11 19:22:45 2025 +0000 1.3 @@ -0,0 +1,86 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php56-opcache" 1.7 +VERSION="5.6.40" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="opcode caching module for PHP 5.6 web programming language." 1.10 +MAINTAINER="shann@slitaz.org" 1.11 +LICENSE="BSD" 1.12 +WEB_SITE="https://www.php.net/" 1.13 + 1.14 +DEPENDS="libmysqlclient php56" 1.15 +WANTED="php56" 1.16 + 1.17 +HOST_ARCH="i486 x86_64" 1.18 + 1.19 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.20 +genpkg_rules() 1.21 +{ 1.22 + mkdir -p $fs/usr/share/php56 1.23 + cp $(find $install | grep opcache.so) $fs/usr/share/php56/ 1.24 +} 1.25 + 1.26 +# Post and pre install commans to stop 1.27 +# and restart Web server if needed. 1.28 +pre_install() 1.29 +{ 1.30 + while read daemon file 1.31 + do 1.32 + if [ -z "$1" -a -f "/var/run/$file" ] 1.33 + then 1.34 + /etc/init.d/$daemon stop 1.35 + fi 1.36 + done <<EOT 1.37 +apache apache/httpd.pid 1.38 +lighttpd lighttpd.pid 1.39 +EOT 1.40 +} 1.41 + 1.42 +post_install() 1.43 +{ 1.44 + grep -q ^extension=opcache.so "$1/etc/php56/php.ini" || 1.45 + sed -e 's|extension=bz2.so|extension=bz2.so\nextension=opcache.so|' \ 1.46 + -i "$1/etc/php56/php.ini" 1.47 + 1.48 + # Start Web server. 1.49 + while read daemon file 1.50 + do 1.51 + [ -z "$1" ] || continue 1.52 + if [ -f "/var/run/$file" ] 1.53 + then 1.54 + /etc/init.d/$daemon stop 1.55 + sleep 2 1.56 + fi 1.57 + if [ -f /etc/init.d/$daemon ] 1.58 + then 1.59 + /etc/init.d/$daemon start 1.60 + fi 1.61 + done <<EOT 1.62 +apache apache/httpd.pid 1.63 +lighttpd lighttpd.pid 1.64 +EOT 1.65 +} 1.66 + 1.67 +# Pre and post remove commands for Tazpkg. 1.68 +pre_remove() 1.69 +{ 1.70 + sed -i '/.*=opcache.so.*/d' /etc/php56/php.ini 1.71 + 1.72 + # Start Web server. 1.73 + while read daemon file 1.74 + do 1.75 + [ -z "$1" ] || continue 1.76 + if [ -f "/var/run/$file" ] 1.77 + then 1.78 + /etc/init.d/$daemon stop 1.79 + sleep 2 1.80 + fi 1.81 + if [ -f /etc/init.d/$daemon ] 1.82 + then 1.83 + /etc/init.d/$daemon start 1.84 + fi 1.85 + done <<EOT 1.86 +apache apache/httpd.pid 1.87 +lighttpd lighttpd.pid 1.88 +EOT 1.89 +}