wok-next view cups/receipt @ rev 19703

Up bird (1.6.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 26 12:29:37 2017 +0200 (2017-04-26)
parents 13806712bef0
children f463de72afe3
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 cook_copy_folders dbus-1 bin sbin cups applications icons var
55 cook_copy_files *.so*
57 # -> cups-dev
58 rm -f $fs/usr/bin/cups-config
59 rm -rf $fs/usr/include
60 # -> libcups
61 rm -f $fs/usr/lib/libcups.so*
63 # Daemon script
64 cp -a $stuff/etc $fs
65 chown -R root:root $fs/etc/init.d
66 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
68 # TazPanel link
69 cp -a $stuff/var $fs
70 chown -R root:root $fs/var/www
72 }
74 post_install()
75 {
76 # Start CUPS daemon and edit daemons.conf
77 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
78 /etc/init.d/cupsd start || continue
79 fi
80 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
81 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
82 cat >> "$1/etc/daemons.conf" <<EOT
83 # CUPS printing daemon options.
84 CUPSD_OPTIONS=""
86 EOT
87 fi
88 }
90 pre_remove()
91 {
92 # Stop CUPS daemon before rm.
93 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
94 :
95 }