wok-4.x rev 1408
Add php-cups
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 24 08:10:52 2008 +0000 (2008-09-24) |
parents | bd6a02acbdf9 |
children | c33837889abb |
files | php-cups/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-cups/receipt Wed Sep 24 08:10:52 2008 +0000 1.3 @@ -0,0 +1,48 @@ 1.4 +# SliTaz package receipt." 1.5 + 1.6 +PACKAGE="php-cups" 1.7 +VERSION="1.3.7" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Common UNIX Printing System bindings for php." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +DEPENDS="cups" 1.12 +WANTED="cups" 1.13 +WEB_SITE="http://www.cups.org/" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/share/php 1.19 + cp $(find $_pkg | grep phpcups.so) $fs/usr/share/php/cups.so 1.20 +} 1.21 + 1.22 +# Post and pre install commans to stop 1.23 +# and restart Web server if needed. 1.24 +pre_install() 1.25 +{ 1.26 + while read daemon file; do 1.27 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.28 + /etc/init.d/$daemon stop 1.29 + fi 1.30 + done <<EOT 1.31 +apache apache/httpd.pid 1.32 +lighttpd lighttpd.pid 1.33 +EOT 1.34 +} 1.35 + 1.36 +post_install() 1.37 +{ 1.38 + grep -q ^extension=msql.so $1/etc/php.ini || \ 1.39 + sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=cups.so|' -i $1/etc/php.ini 1.40 + # Start Web server. 1.41 + while read daemon file; do 1.42 + if [ -z "$1" -a -f /etc/init.d/$daemon \ 1.43 + -a ! -f "/var/run/$file" ]; then 1.44 + /etc/init.d/$daemon start 1.45 + fi 1.46 + done <<EOT 1.47 +apache apache/httpd.pid 1.48 +lighttpd lighttpd.pid 1.49 +EOT 1.50 +} 1.51 +