wok-backports diff php-imap/receipt @ rev 55
Remove ashism ==
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 27 17:46:33 2019 +0100 (2019-02-27) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-imap/receipt Wed Feb 27 17:46:33 2019 +0100 1.3 @@ -0,0 +1,74 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-imap" 1.7 +VERSION="5.5.13" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="imap module for PHP web programming language." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="BSD" 1.12 +WEB_SITE="http://www.php.net/" 1.13 +WANTED="php" 1.14 + 1.15 +DEPENDS="php openssl" 1.16 + 1.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.18 +genpkg_rules() 1.19 +{ 1.20 + mkdir -p $fs/usr/share/php 1.21 + cp $(find $install | grep imap.so) $fs/usr/share/php/ 1.22 +} 1.23 + 1.24 +# Post and pre install commans to stop 1.25 +# and restart Web server if needed. 1.26 +pre_install() 1.27 +{ 1.28 + while read daemon file; do 1.29 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.30 + /etc/init.d/$daemon stop 1.31 + fi 1.32 + done <<EOT 1.33 +apache apache/httpd.pid 1.34 +lighttpd lighttpd.pid 1.35 +EOT 1.36 +} 1.37 + 1.38 +post_install() 1.39 +{ 1.40 + grep -q ^extension=imap.so $1/etc/php.ini || \ 1.41 + sed -e 's|extension=msql.so|extension=msql.so\nextension=imap.so|' -i $1/etc/php.ini 1.42 + # Start Web server. 1.43 + while read daemon file; do 1.44 + [ -z "$1" ] || continue 1.45 + if [ -f "/var/run/$file" ]; then 1.46 + /etc/init.d/$daemon stop 1.47 + sleep 2 1.48 + fi 1.49 + if [ -f /etc/init.d/$daemon ]; then 1.50 + /etc/init.d/$daemon start 1.51 + fi 1.52 + done <<EOT 1.53 +apache apache/httpd.pid 1.54 +lighttpd lighttpd.pid 1.55 +EOT 1.56 +} 1.57 + 1.58 +# Pre and post remove commands for Tazpkg. 1.59 +pre_remove() 1.60 +{ 1.61 + sed -i '/.*=imap.so.*/d' /etc/php.ini 1.62 + 1.63 + # Start Web server. 1.64 + while read daemon file; do 1.65 + [ -z "$1" ] || continue 1.66 + if [ -f "/var/run/$file" ]; then 1.67 + /etc/init.d/$daemon stop 1.68 + sleep 2 1.69 + fi 1.70 + if [ -f /etc/init.d/$daemon ]; then 1.71 + /etc/init.d/$daemon start 1.72 + fi 1.73 + done <<EOT 1.74 +apache apache/httpd.pid 1.75 +lighttpd lighttpd.pid 1.76 +EOT 1.77 +}