wok-undigest diff php-cups/receipt @ rev 1201

palemoon : ac_add_options
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Fri Aug 19 22:41:17 2016 +0200 (2016-08-19)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/php-cups/receipt	Fri Aug 19 22:41:17 2016 +0200
     1.3 @@ -0,0 +1,72 @@
     1.4 +# SliTaz package receipt."
     1.5 +
     1.6 +PACKAGE="php-cups"
     1.7 +VERSION="1.6.2"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="Common UNIX Printing System bindings for php."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +LICENSE="GPL2 LGPL2"
    1.12 +WANTED="cups"
    1.13 +WEB_SITE="http://www.cups.org/"
    1.14 +
    1.15 +DEPENDS="cups libtasn1"
    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 phpcups.so) $fs/usr/share/php/cups.so
    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=cups.so $1/etc/php.ini || \
    1.41 +	    sed -e 's|extension=msql.so|extension=msql.so\nextension=cups.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 [ -z "$1" -a -f "/var/run/$file" ]; then
    1.46 +			/etc/init.d/$daemon stop
    1.47 +			sleep 2
    1.48 +		fi
    1.49 +		if [ -z "$1" -a -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 '/.*=cups.so.*/d' /etc/php.ini
    1.62 +
    1.63 +	# Start Web server.
    1.64 +	while read daemon file; do
    1.65 +		[ -f "/var/run/$file" ] || continue
    1.66 +		if [ -f /etc/init.d/$daemon  ]; then
    1.67 +			/etc/init.d/$daemon stop
    1.68 +			sleep 2
    1.69 +			/etc/init.d/$daemon start
    1.70 +		fi
    1.71 +	done <<EOT
    1.72 +apache apache/httpd.pid
    1.73 +lighttpd lighttpd.pid
    1.74 +EOT
    1.75 +}