wok annotate cups-pam/receipt @ rev 24133

Up tazinst (115)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 23 15:17:56 2021 +0000 (2021-10-23)
parents 5f106bffd69a
children 92bbd9147f9b
rev   line source
pascal@2219 1 # SliTaz package receipt.
pascal@2219 2
pascal@2219 3 PACKAGE="cups-pam"
Hans-G?nter@22620 4 VERSION="2.3.1"
pascal@2219 5 CATEGORY="system-tools"
al@18716 6 SHORT_DESC="Common UNIX Printing System with PAM support."
pascal@2219 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15202 8 LICENSE="GPL2 LGPL2"
Hans-G?nter@22620 9 WEB_SITE="https://www.cups.org/"
Hans-G?nter@22620 10
pascal@2219 11 SOURCE="cups"
Hans-G?nter@22620 12 TARBALL="$SOURCE-$VERSION-source.tar.gz"
Hans-G?nter@22620 13 WGET_URL="https://github.com/apple/$SOURCE/releases/download/v$VERSION/$TARBALL"
Hans-G?nter@22620 14
pascal@2219 15 PROVIDE="cups:pam"
Hans-G?nter@22907 16 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl
Hans-G?nter@22907 17 libunistring pam"
Hans-G?nter@22620 18 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libcomerr-dev
Hans-G?nter@22907 19 libgcrypt-dev libgnutls libpng-dev libunistring-dev openssl-dev
Hans-G?nter@22907 20 pam pam-dev tiff-dev"
pascal@15202 21
pascal@24055 22 current_version()
pascal@24055 23 {
pascal@24055 24 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
pascal@24055 25 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
pascal@24055 26 }
pascal@24055 27
pascal@2219 28 # Rules to configure and make the package.
pascal@2219 29 compile_rules()
pascal@2219 30 {
Hans-G?nter@22620 31 # patch -Np1 -i ${WOK}/cups/stuff/install-sh.u
Hans-G?nter@22620 32
Hans-G?nter@22620 33 export LDFLAGS="$LDFLAGS -lrt"
Hans-G?nter@22620 34
Hans-G?nter@22620 35 # Set list of wanted locales in LOCALE_PACK
Hans-G?nter@22620 36 . $WOK/slitaz-i18n/stuff/locale-pack.conf
Hans-G?nter@22620 37
Hans-G?nter@22620 38 # <= 2.0.2 unrecognised
Hans-G?nter@22620 39 # --disable-ldap
Hans-G?nter@22620 40
Hans-G?nter@22620 41 ./configure \
Hans-G?nter@22620 42 --prefix=/usr \
Hans-G?nter@22620 43 --sysconfdir=/etc \
Hans-G?nter@22620 44 --localstatedir=/var \
Hans-G?nter@22620 45 --mandir=/usr/share/man \
Hans-G?nter@22620 46 --enable-static \
Hans-G?nter@22620 47 --enable-pam \
Hans-G?nter@22620 48 --disable-ldap \
Hans-G?nter@22620 49 --with-cups-user=nobody \
Hans-G?nter@22620 50 --with-cups-group=nogroup \
Hans-G?nter@22620 51 --with-languages="$LOCALE_PACK" \
pascal@2219 52 $CONFIGURE_ARGS &&
pascal@2219 53 make &&
slaxemulator@14622 54 make BUILDROOT=$DESTDIR install
Hans-G?nter@22620 55
Hans-G?nter@22620 56 cp -f $WOK/cups/stuff/cups.desktop \
Hans-G?nter@22620 57 $install/usr/share/applications/cups.desktop
pascal@2219 58 }
pascal@2219 59
pascal@2219 60 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2219 61 genpkg_rules()
pascal@2219 62 {
Hans-G?nter@22620 63 mkdir -p $fs/etc
Hans-G?nter@22620 64 mkdir -p $fs/usr/lib
Hans-G?nter@22620 65 mkdir -p $fs/usr/share
al@18716 66
Hans-G?nter@22620 67 cp -a $install/etc/cups $fs/etc
Hans-G?nter@22620 68 cp -a $install/etc/dbus* $fs/etc
Hans-G?nter@22620 69 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22620 70 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@22620 71 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@22620 72 cp -a $install/usr/lib/cups $fs/usr/lib
Hans-G?nter@22620 73 cp -a $install/usr/share/cups $fs/usr/share
Hans-G?nter@22620 74 cp -a $install/usr/share/icons $fs/usr/share
Hans-G?nter@22620 75 cp -a $install/var $fs
al@18716 76
mojo@17887 77 # Remove files provided by cups-filters
Hans-G?nter@22620 78 rm -f $fs/usr/share/cups/banners/*
Hans-G?nter@22620 79 rm -f $fs/usr/share/cups/data/testprint
al@18716 80
al@18716 81 # Remove files provided by libcups
Hans-G?nter@22620 82 rm -f $fs/usr/lib/libcups.so*
al@18716 83
pascal@2238 84 # PAM conf
Hans-G?nter@22620 85 cp -a $stuff/etc $fs
pascal@2238 86
pascal@2219 87 # Daemon script
Hans-G?nter@22620 88 cp -a $WOK/cups/stuff/etc $fs
al@18716 89
al@18716 90 # TazPanel link
Hans-G?nter@22620 91 cp -a $WOK/cups/stuff/var $fs
al@18716 92
pascal@2219 93 }
pascal@2219 94
pascal@2219 95 post_install()
pascal@2219 96 {
al@18716 97 # Start CUPS daemon and edit daemons.conf
Hans-G?nter@22620 98 if [ -z "$1" -a ! -s /aufs-umount.sh ]
Hans-G?nter@22620 99 then
pascal@2219 100 /etc/init.d/cupsd start || continue
pascal@2219 101 fi
Hans-G?nter@22620 102 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
Hans-G?nter@22620 103 then
al@18716 104 cat >> "$1/etc/daemons.conf" <<EOT
al@18716 105 # CUPS printing daemon options.
al@18716 106 CUPSD_OPTIONS=""
al@18716 107
al@18716 108 EOT
pascal@2219 109 fi
pascal@2219 110 }
pascal@2219 111
pascal@2219 112 pre_remove()
pascal@2219 113 {
Hans-G?nter@22620 114 # Stop CUPS daemon before remove.
al@18716 115 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
al@18716 116 :
pascal@8875 117 }
pascal@8875 118
pascal@8875 119 post_remove()
pascal@8875 120 {
al@18716 121 ln -s /bin/busybox "$1/usr/bin/lpr"
pascal@8875 122 }