wok-next view cups/receipt @ rev 19783

Up receipts to v2 syntax: cook_copy_files & cook_copy_folders -> copy
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 18 04:38:10 2017 +0300 (2017-06-18)
parents 27e7c76d2c94
children 831ee4103c8f
line source
1 # SliTaz package receipt.
3 PACKAGE="cups"
4 VERSION="2.1.4"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 WEB_SITE="https://www.cups.org/"
10 TAGS="printer printing"
12 TARBALL="$PACKAGE-$VERSION-source.tar.gz"
13 WGET_URL="https://github.com/apple/cups/releases/download/release-$VERSION/$TARBALL"
15 DEPENDS="acl dbus libcups libgnutls libusb zlib"
16 BUILD_DEPENDS="automake libusb-dev zlib-dev dbus-dev gnutls-dev perl python \
17 acl-dev"
18 SPLIT="libcups cups-doc"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 sed -i 's:555:755:g;s:444:644:g' Makedefs.in &&
24 sed -i '/MAN.EXT/s:.gz::g' configure config-scripts/cups-manpages.m4 &&
25 sed -i '/LIBGCRYPTCONFIG/d' config-scripts/cups-ssl.m4 &&
27 aclocal -I config-scripts &&
28 autoconf -I config-scripts &&
30 CC=gcc \
31 ./configure \
32 --sysconfdir=/etc \
33 --libdir=/usr/lib \
34 --localstatedir=/var \
35 --disable-systemd \
36 --with-rcdir=/tmp/cupsinit \
37 --with-system-groups=lpadmin \
38 --with-docdir=/usr/share/doc/cups-$VERSION \
39 $CONFIGURE_ARGS &&
40 make
41 make BUILDROOT=$install install &&
42 rm -rf $install/tmp &&
43 ln -svnf ../doc/cups-$VERSION $install/usr/share/cups/doc-$VERSION
44 echo "ServerName /var/run/cups/cups.sock" > $install/etc/cups/client.conf &&
46 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
47 $install/usr/share/cups/templates/choose-uri.tmpl &&
48 sed -i 's|htmlview|browser|' $install/usr/share/applications/cups.desktop
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 copy dbus-1/ bin/ sbin/ cups/ applications/ icons/ var/ *.so*
56 # -> cups-dev
57 rm -f $fs/usr/bin/cups-config
58 rm -rf $fs/usr/include
59 # -> libcups
60 rm -f $fs/usr/lib/libcups.so*
62 # Daemon script
63 cp -a $stuff/etc $fs
64 chown -R root:root $fs/etc/init.d
65 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
67 # TazPanel link
68 cp -a $stuff/var $fs
69 chown -R root:root $fs/var/www
71 }
73 post_install()
74 {
75 # Start CUPS daemon and edit daemons.conf
76 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
77 /etc/init.d/cupsd start || continue
78 fi
79 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
80 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
81 cat >> "$1/etc/daemons.conf" <<EOT
82 # CUPS printing daemon options.
83 CUPSD_OPTIONS=""
85 EOT
86 fi
87 }
89 pre_remove()
90 {
91 # Stop CUPS daemon before rm.
92 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
93 :
94 }