wok-next view php-cups/receipt @ rev 15307
hardinfo: add libm & libgmodule-2.0
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 27 13:49:30 2013 +0000 (2013-09-27) |
parents | 205d192370e5 |
children |
line source
1 # SliTaz package receipt."
3 PACKAGE="php-cups"
4 VERSION="1.6.2"
5 CATEGORY="development"
6 SHORT_DESC="Common UNIX Printing System bindings for php."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 WANTED="cups"
10 WEB_SITE="http://www.cups.org/"
12 DEPENDS="cups libtasn1"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/php
18 cp $(find $install | grep phpcups.so) $fs/usr/share/php/cups.so
19 }
21 # Post and pre install commans to stop
22 # and restart Web server if needed.
23 pre_install()
24 {
25 while read daemon file; do
26 if [ -z "$1" -a -f "/var/run/$file" ]; then
27 /etc/init.d/$daemon stop
28 fi
29 done <<EOT
30 apache apache/httpd.pid
31 lighttpd lighttpd.pid
32 EOT
33 }
35 post_install()
36 {
37 grep -q ^extension=cups.so $1/etc/php.ini || \
38 sed -e 's|extension=msql.so|extension=msql.so\nextension=cups.so|' -i $1/etc/php.ini
39 # Start Web server.
40 while read daemon file; do
41 [ -z "$1" ] || continue
42 if [ -z "$1" -a -f "/var/run/$file" ]; then
43 /etc/init.d/$daemon stop
44 sleep 2
45 fi
46 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
47 /etc/init.d/$daemon start
48 fi
49 done <<EOT
50 apache apache/httpd.pid
51 lighttpd lighttpd.pid
52 EOT
53 }
55 # Pre and post remove commands for Tazpkg.
56 pre_remove()
57 {
58 sed -i '/.*=cups.so.*/d' /etc/php.ini
60 # Start Web server.
61 while read daemon file; do
62 [ -f "/var/run/$file" ] || continue
63 if [ -f /etc/init.d/$daemon ]; then
64 /etc/init.d/$daemon stop
65 sleep 2
66 /etc/init.d/$daemon start
67 fi
68 done <<EOT
69 apache apache/httpd.pid
70 lighttpd lighttpd.pid
71 EOT
72 }