wok-6.x view php-cups/receipt @ rev 12820
glibc-base: improve receipt for ARM and cross-compilation
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 21 23:48:44 2012 +0200 (2012-05-21) |
parents | eea1393c91a5 |
children | 205d192370e5 |
line source
1 # SliTaz package receipt."
3 PACKAGE="php-cups"
4 VERSION="1.4.6"
5 CATEGORY="development"
6 SHORT_DESC="Common UNIX Printing System bindings for php."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="cups libtasn1"
9 WANTED="cups"
10 WEB_SITE="http://www.cups.org/"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/share/php
16 cp $(find $_pkg | grep phpcups.so) $fs/usr/share/php/cups.so
17 }
19 # Post and pre install commans to stop
20 # and restart Web server if needed.
21 pre_install()
22 {
23 while read daemon file; do
24 if [ -z "$1" -a -f "/var/run/$file" ]; then
25 /etc/init.d/$daemon stop
26 fi
27 done <<EOT
28 apache apache/httpd.pid
29 lighttpd lighttpd.pid
30 EOT
31 }
33 post_install()
34 {
35 grep -q ^extension=cups.so $1/etc/php.ini || \
36 sed -e 's|extension=msql.so|extension=msql.so\nextension=cups.so|' -i $1/etc/php.ini
37 # Start Web server.
38 while read daemon file; do
39 [ -z "$1" ] || continue
40 if [ -z "$1" -a -f "/var/run/$file" ]; then
41 /etc/init.d/$daemon stop
42 sleep 2
43 fi
44 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
45 /etc/init.d/$daemon start
46 fi
47 done <<EOT
48 apache apache/httpd.pid
49 lighttpd lighttpd.pid
50 EOT
51 }
53 # Pre and post remove commands for Tazpkg.
54 pre_remove()
55 {
56 sed -i '/.*=cups.so.*/d' /etc/php.ini
58 # Start Web server.
59 while read daemon file; do
60 [ -f "/var/run/$file" ] || continue
61 if [ -f /etc/init.d/$daemon ]; then
62 /etc/init.d/$daemon stop
63 sleep 2
64 /etc/init.d/$daemon start
65 fi
66 done <<EOT
67 apache apache/httpd.pid
68 lighttpd lighttpd.pid
69 EOT
70 }