wok view cups/receipt @ rev 25638

Up tinyssh (20240101 CVE-2023-48795)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 05 10:31:44 2024 +0000 (5 months ago)
parents 92bbd9147f9b
children
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 # What is the latest version available today?
23 current_version()
24 {
25 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
26 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 # patch -Np1 -i $stuff/install-sh.u
34 export LDFLAGS="$LDFLAGS -lrt"
36 # Set list of wanted locales in LOCALE_PACK
37 . $WOK/slitaz-i18n/stuff/locale-pack.conf
39 # <= 2.0.2 unrecognised
40 # --disable-ldap
41 # --disable-slp
42 # --with-pdftops=pdftops
44 ./configure \
45 --prefix=/usr \
46 --sysconfdir=/etc \
47 --localstatedir=/var \
48 --mandir=/usr/share/man \
49 --enable-static \
50 --disable-pam \
51 --disable-gssapi \
52 --disable-acl \
53 --enable-dbus \
54 --with-dbusdir=/etc/dbus-1 \
55 --with-cups-user=nobody \
56 --with-cups-group=nogroup \
57 --with-languages="$LOCALE_PACK" \
58 $CONFIGURE_ARGS &&
59 make &&
60 make install BUILDROOT=$DESTDIR
62 cp -f $stuff/cups.desktop \
63 $install/usr/share/applications/cups.desktop
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/etc
70 mkdir -p $fs/usr/lib
71 mkdir -p $fs/usr/share
73 cp -a $install/etc/cups $fs/etc
74 cp -a $install/etc/dbus* $fs/etc
75 cp -a $install/usr/bin $fs/usr
76 cp -a $install/usr/lib/*.so* $fs/usr/lib
77 cp -a $install/usr/lib/cups $fs/usr/lib
78 cp -a $install/usr/sbin $fs/usr
79 cp -a $install/usr/share/cups $fs/usr/share
80 cp -a $install/usr/share/icons $fs/usr/share
81 cp -a $install/var $fs
83 # Remove files provided by cups-filters
84 rm -f $fs/usr/share/cups/banners/*
85 rm -f $fs/usr/share/cups/data/testprint
87 # Remove files provided by libcups
88 rm -f $fs/usr/lib/libcups.so*
90 # Daemon script
91 cp -a $stuff/etc $fs
92 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
94 # TazPanel link
95 cp -a $stuff/var $fs
97 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
98 $fs/usr/share/cups/templates/choose-uri.tmpl
99 }
101 post_install()
102 {
103 # Start CUPS daemon and edit daemons.conf
104 if [ -z "$1" -a ! -s /aufs-umount.sh ]
105 then
106 /etc/init.d/cupsd start || continue
107 fi
108 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
109 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
110 then
111 cat >> "$1/etc/daemons.conf" <<EOT
112 # CUPS printing daemon options.
113 CUPSD_OPTIONS=""
115 EOT
116 fi
117 echo "Add cupsd to RUN_DAEMONS in /etc/rcS.conf to start cupsd after SliTaz startup."
118 }
120 pre_remove()
121 {
122 # Stop CUPS daemon before removing.
123 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
124 :
125 }
127 post_remove()
128 {
129 ln -fs /bin/busybox "$1/usr/bin/lpr"
130 }