wok view cups-pam/receipt @ rev 25632

Up gtklife (5.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 23 14:06:29 2023 +0000 (11 months ago)
parents 92bbd9147f9b
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 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
27 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 # patch -Np1 -i ${WOK}/cups/stuff/install-sh.u
35 export LDFLAGS="$LDFLAGS -lrt"
37 # Set list of wanted locales in LOCALE_PACK
38 . $WOK/slitaz-i18n/stuff/locale-pack.conf
40 # <= 2.0.2 unrecognised
41 # --disable-ldap
43 ./configure \
44 --prefix=/usr \
45 --sysconfdir=/etc \
46 --localstatedir=/var \
47 --mandir=/usr/share/man \
48 --enable-static \
49 --enable-pam \
50 --disable-ldap \
51 --with-cups-user=nobody \
52 --with-cups-group=nogroup \
53 --with-languages="$LOCALE_PACK" \
54 $CONFIGURE_ARGS &&
55 make &&
56 make install BUILDROOT=$DESTDIR
58 cp -f $WOK/cups/stuff/cups.desktop $install/usr/share/applications/cups.desktop
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/etc
65 mkdir -p $fs/usr/lib
66 mkdir -p $fs/usr/share
68 cp -a $install/etc/cups $fs/etc
69 cp -a $install/etc/dbus* $fs/etc
70 cp -a $install/usr/bin $fs/usr
71 cp -a $install/usr/lib/*.so* $fs/usr/lib
72 cp -a $install/usr/lib/cups $fs/usr/lib
73 cp -a $install/usr/sbin $fs/usr
74 cp -a $install/usr/share/cups $fs/usr/share
75 cp -a $install/usr/share/icons $fs/usr/share
76 cp -a $install/var $fs
78 # Remove files provided by cups-filters
79 rm -f $fs/usr/share/cups/banners/*
80 rm -f $fs/usr/share/cups/data/testprint
82 # Remove files provided by libcups
83 rm -f $fs/usr/lib/libcups.so*
85 # PAM configuration
86 cp -a $stuff/etc $fs
88 # Daemon script
89 cp -a $WOK/cups/stuff/etc $fs
91 # TazPanel link
92 cp -a $WOK/cups/stuff/var $fs
93 }
95 post_install()
96 {
97 # Start CUPS daemon and edit daemons.conf
98 if [ -z "$1" -a ! -s /aufs-umount.sh ]
99 then
100 /etc/init.d/cupsd start || continue
101 fi
102 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
103 then
104 cat >> "$1/etc/daemons.conf" <<EOT
105 # CUPS printing daemon options.
106 CUPSD_OPTIONS=""
108 EOT
109 fi
110 }
112 pre_remove()
113 {
114 # Stop CUPS daemon before removing.
115 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
116 :
117 }
119 post_remove()
120 {
121 ln -s /bin/busybox "$1/usr/bin/lpr"
122 }