wok-current view cups/receipt @ rev 19180
cups: fix group backends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 04 10:51:22 2016 +0200 (2016-06-04) |
parents | 9382538ce463 |
children | b08da1a20c23 |
line source
1 # SliTaz package receipt.
3 PACKAGE="cups"
4 VERSION="2.0.2"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
10 WEB_SITE="http://www.cups.org/"
11 WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL"
12 TAGS="printer printing"
14 DEPENDS="libssl dbus libcomerr cups-doc libkrb5 libusb-compat poppler-apps \
15 cups-filters libcups"
16 BUILD_DEPENDS="libgcrypt-dev gnutls-dev dbus-dev jpeg-dev libpng-dev \
17 tiff-dev zlib-dev libtasn1-dev openssl-dev libusb-compat-dev php-dev \
18 acl-dev poppler-apps"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 patch -Np1 -i $stuff/install-sh.u
24 ./configure \
25 --prefix=/usr \
26 --sysconfdir=/etc \
27 --localstatedir=/var \
28 --mandir=/usr/share/man \
29 --enable-static \
30 --disable-ldap \
31 --disable-pam \
32 --disable-gssapi \
33 --disable-acl \
34 --disable-slp \
35 --enable-dbus \
36 --with-dbusdir=/etc/dbus-1 \
37 --with-cups-user=nobody \
38 --with-cups-group=nogroup \
39 --with-languages="de es fr pt_BR ru" \
40 --with-pdftops=pdftops \
41 $CONFIGURE_ARGS &&
42 make &&
43 make BUILDROOT=$DESTDIR install
44 cp -f $stuff/cups.desktop $install/usr/share/applications/cups.desktop
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/etc $fs/usr/lib $fs/usr/share
52 cp -a $install/etc/cups $fs/etc
53 cp -a $install/etc/dbus* $fs/etc
54 cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/sbin $fs/usr
56 cp -a $install/usr/lib/*.so* $fs/usr/lib
57 cp -a $install/usr/lib/cups $fs/usr/lib
58 cp -a $install/usr/share/cups $fs/usr/share
59 cp -a $install/usr/share/icons $fs/usr/share
60 cp -a $install/var $fs
62 # Remove files provided by cups-filters
63 rm -f $fs/usr/share/cups/banners/*
64 rm -f $fs/usr/share/cups/data/testprint
66 # Remove files provided by libcups
67 rm -f $fs/usr/lib/libcups.so*
69 # Daemon script
70 cp -a $stuff/etc $fs
71 sed -i 's|^#Group .*|Group lp\n# for access to parallel:/dev/usb/lp0|' $fs/etc/cups/cups-files.conf
73 # TazPanel link
74 cp -a $stuff/var $fs
75 }
77 post_install()
78 {
79 # Start CUPS daemon and edit daemons.conf
80 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
81 /etc/init.d/cupsd start || continue
82 fi
83 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
84 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
85 cat >> "$1/etc/daemons.conf" <<EOT
86 # CUPS printing daemon options.
87 CUPSD_OPTIONS=""
89 EOT
90 fi
91 }
93 pre_remove()
94 {
95 # Stop CUPS daemon before rm.
96 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
97 :
98 }
100 post_remove()
101 {
102 ln -s /bin/busybox "$1/usr/bin/lpr"
103 }