wok-6.x view cups-pam/receipt @ rev 25512

memtest: 386/1M support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 14 07:20:48 2023 +0000 (21 months ago)
parents 5ea0ce1cecc0
children
line source
1 # SliTaz package receipt.
3 PACKAGE="cups-pam"
4 VERSION="2.4.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="Common UNIX Printing System with PAM support."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 WEB_SITE="https://www.cups.org/"
11 SOURCE="cups"
12 TARBALL="$SOURCE-$VERSION-source.tar.gz"
13 WGET_URL="https://github.com/OpenPrinting/$SOURCE/releases/download/v$VERSION/$TARBALL"
15 PROVIDE="cups:pam"
16 SUGGESTED="cups-lang"
17 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl
18 libunistring pam"
19 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libcomerr-dev
20 libgcrypt-dev libgnutls libpng-dev libunistring-dev openssl-dev
21 pam pam-dev tiff-dev"
23 current_version()
24 {
25 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
26 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 # patch -Np1 -i ${WOK}/cups/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
42 ./configure \
43 --prefix=/usr \
44 --sysconfdir=/etc \
45 --localstatedir=/var \
46 --mandir=/usr/share/man \
47 --enable-static \
48 --enable-pam \
49 --disable-ldap \
50 --with-cups-user=nobody \
51 --with-cups-group=nogroup \
52 --with-languages="$LOCALE_PACK" \
53 $CONFIGURE_ARGS &&
54 make &&
55 make install BUILDROOT=$DESTDIR
57 cp -f $WOK/cups/stuff/cups.desktop $install/usr/share/applications/cups.desktop
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 mkdir -p $fs/etc
64 mkdir -p $fs/usr/lib
65 mkdir -p $fs/usr/share
67 cp -a $install/etc/cups $fs/etc
68 cp -a $install/etc/dbus* $fs/etc
69 cp -a $install/usr/bin $fs/usr
70 cp -a $install/usr/lib/*.so* $fs/usr/lib
71 cp -a $install/usr/lib/cups $fs/usr/lib
72 cp -a $install/usr/sbin $fs/usr
73 cp -a $install/usr/share/cups $fs/usr/share
74 cp -a $install/usr/share/icons $fs/usr/share
75 cp -a $install/var $fs
77 # Remove files provided by cups-filters
78 rm -f $fs/usr/share/cups/banners/*
79 rm -f $fs/usr/share/cups/data/testprint
81 # Remove files provided by libcups
82 rm -f $fs/usr/lib/libcups.so*
84 # PAM configuration
85 cp -a $stuff/etc $fs
87 # Daemon script
88 cp -a $WOK/cups/stuff/etc $fs
90 # TazPanel link
91 cp -a $WOK/cups/stuff/var $fs
92 }
94 post_install()
95 {
96 # Start CUPS daemon and edit daemons.conf
97 if [ -z "$1" -a ! -s /aufs-umount.sh ]
98 then
99 /etc/init.d/cupsd start || continue
100 fi
101 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
102 then
103 cat >> "$1/etc/daemons.conf" <<EOT
104 # CUPS printing daemon options.
105 CUPSD_OPTIONS=""
107 EOT
108 fi
109 }
111 pre_remove()
112 {
113 # Stop CUPS daemon before removing.
114 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
115 :
116 }
118 post_remove()
119 {
120 ln -s /bin/busybox "$1/usr/bin/lpr"
121 }