wok view cups/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (23 months ago)
parents 5ea0ce1cecc0
children fe1b5660fdd1
line source
1 # SliTaz package receipt.
3 PACKAGE="cups"
4 VERSION="2.4.1"
5 CATEGORY="system-tools"
6 TAGS="printer printing"
7 SHORT_DESC="Common UNIX Printing System."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="GPL2 LGPL2"
10 WEB_SITE="https://www.cups.org/"
12 TARBALL="$PACKAGE-$VERSION-source.tar.gz"
13 WGET_URL="https://github.com/OpenPrinting/$PACKAGE/releases/download/v$VERSION/$TARBALL"
15 SUGGESTED="cups-lang"
16 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl
17 libunistring libusb-compat poppler-apps"
18 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libgcrypt-dev
19 libgnutls libpng-dev libtasn1-dev libunistring-dev libusb-compat-dev
20 openssl-dev php-dev poppler-apps tiff-dev zlib-dev"
22 current_version()
23 {
24 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
25 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 # patch -Np1 -i $stuff/install-sh.u
33 export LDFLAGS="$LDFLAGS -lrt"
35 # Set list of wanted locales in LOCALE_PACK
36 . $WOK/slitaz-i18n/stuff/locale-pack.conf
38 # <= 2.0.2 unrecognised
39 # --disable-ldap
40 # --disable-slp
41 # --with-pdftops=pdftops
43 ./configure \
44 --prefix=/usr \
45 --sysconfdir=/etc \
46 --localstatedir=/var \
47 --mandir=/usr/share/man \
48 --enable-static \
49 --disable-pam \
50 --disable-gssapi \
51 --disable-acl \
52 --enable-dbus \
53 --with-dbusdir=/etc/dbus-1 \
54 --with-cups-user=nobody \
55 --with-cups-group=nogroup \
56 --with-languages="$LOCALE_PACK" \
57 $CONFIGURE_ARGS &&
58 make &&
59 make install BUILDROOT=$DESTDIR
61 cp -f $stuff/cups.desktop \
62 $install/usr/share/applications/cups.desktop
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 mkdir -p $fs/etc
69 mkdir -p $fs/usr/lib
70 mkdir -p $fs/usr/share
72 cp -a $install/etc/cups $fs/etc
73 cp -a $install/etc/dbus* $fs/etc
74 cp -a $install/usr/bin $fs/usr
75 cp -a $install/usr/lib/*.so* $fs/usr/lib
76 cp -a $install/usr/lib/cups $fs/usr/lib
77 cp -a $install/usr/sbin $fs/usr
78 cp -a $install/usr/share/cups $fs/usr/share
79 cp -a $install/usr/share/icons $fs/usr/share
80 cp -a $install/var $fs
82 # Remove files provided by cups-filters
83 rm -f $fs/usr/share/cups/banners/*
84 rm -f $fs/usr/share/cups/data/testprint
86 # Remove files provided by libcups
87 rm -f $fs/usr/lib/libcups.so*
89 # Daemon script
90 cp -a $stuff/etc $fs
91 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
93 # TazPanel link
94 cp -a $stuff/var $fs
96 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
97 $fs/usr/share/cups/templates/choose-uri.tmpl
98 }
100 post_install()
101 {
102 # Start CUPS daemon and edit daemons.conf
103 if [ -z "$1" -a ! -s /aufs-umount.sh ]
104 then
105 /etc/init.d/cupsd start || continue
106 fi
107 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
108 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
109 then
110 cat >> "$1/etc/daemons.conf" <<EOT
111 # CUPS printing daemon options.
112 CUPSD_OPTIONS=""
114 EOT
115 fi
116 echo "Add cupsd to RUN_DAEMONS in /etc/rcS.conf to start cupsd after SliTaz startup."
117 }
119 pre_remove()
120 {
121 # Stop CUPS daemon before removing.
122 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
123 :
124 }
126 post_remove()
127 {
128 ln -fs /bin/busybox "$1/usr/bin/lpr"
129 }