wok-6.x annotate cups-pam/receipt @ rev 25445
itaka: fix wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 06 07:38:52 2022 +0000 (2022-09-06) |
parents | 5ea0ce1cecc0 |
children |
rev | line source |
---|---|
pascal@2219 | 1 # SliTaz package receipt. |
pascal@2219 | 2 |
pascal@2219 | 3 PACKAGE="cups-pam" |
Hans-G?nter@24444 | 4 VERSION="2.4.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@24444 | 13 WGET_URL="https://github.com/OpenPrinting/$SOURCE/releases/download/v$VERSION/$TARBALL" |
Hans-G?nter@22620 | 14 |
pascal@2219 | 15 PROVIDE="cups:pam" |
Hans-G?nter@24444 | 16 SUGGESTED="cups-lang" |
Hans-G?nter@22907 | 17 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl |
Hans-G?nter@22907 | 18 libunistring pam" |
Hans-G?nter@22620 | 19 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libcomerr-dev |
Hans-G?nter@22907 | 20 libgcrypt-dev libgnutls libpng-dev libunistring-dev openssl-dev |
Hans-G?nter@22907 | 21 pam pam-dev tiff-dev" |
pascal@15202 | 22 |
pascal@24055 | 23 current_version() |
pascal@24055 | 24 { |
pascal@24055 | 25 wget -O - ${WGET_URL%/down*} 2>/dev/null | \ |
pascal@24055 | 26 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 27 } |
pascal@24055 | 28 |
pascal@2219 | 29 # Rules to configure and make the package. |
pascal@2219 | 30 compile_rules() |
pascal@2219 | 31 { |
Hans-G?nter@22620 | 32 # patch -Np1 -i ${WOK}/cups/stuff/install-sh.u |
Hans-G?nter@22620 | 33 |
Hans-G?nter@22620 | 34 export LDFLAGS="$LDFLAGS -lrt" |
Hans-G?nter@22620 | 35 |
Hans-G?nter@22620 | 36 # Set list of wanted locales in LOCALE_PACK |
Hans-G?nter@22620 | 37 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
Hans-G?nter@22620 | 38 |
Hans-G?nter@22620 | 39 # <= 2.0.2 unrecognised |
Hans-G?nter@22620 | 40 # --disable-ldap |
Hans-G?nter@22620 | 41 |
Hans-G?nter@22620 | 42 ./configure \ |
Hans-G?nter@22620 | 43 --prefix=/usr \ |
Hans-G?nter@22620 | 44 --sysconfdir=/etc \ |
Hans-G?nter@22620 | 45 --localstatedir=/var \ |
Hans-G?nter@22620 | 46 --mandir=/usr/share/man \ |
Hans-G?nter@22620 | 47 --enable-static \ |
Hans-G?nter@22620 | 48 --enable-pam \ |
Hans-G?nter@22620 | 49 --disable-ldap \ |
Hans-G?nter@22620 | 50 --with-cups-user=nobody \ |
Hans-G?nter@22620 | 51 --with-cups-group=nogroup \ |
Hans-G?nter@22620 | 52 --with-languages="$LOCALE_PACK" \ |
pascal@2219 | 53 $CONFIGURE_ARGS && |
pascal@2219 | 54 make && |
Hans-G?nter@24444 | 55 make install BUILDROOT=$DESTDIR |
Hans-G?nter@22620 | 56 |
Hans-G?nter@24444 | 57 cp -f $WOK/cups/stuff/cups.desktop $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/lib/*.so* $fs/usr/lib |
Hans-G?nter@22620 | 71 cp -a $install/usr/lib/cups $fs/usr/lib |
Hans-G?nter@24444 | 72 cp -a $install/usr/sbin $fs/usr |
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 |
Hans-G?nter@24444 | 84 # PAM configuration |
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 |
pascal@2219 | 92 } |
pascal@2219 | 93 |
pascal@2219 | 94 post_install() |
pascal@2219 | 95 { |
al@18716 | 96 # Start CUPS daemon and edit daemons.conf |
Hans-G?nter@22620 | 97 if [ -z "$1" -a ! -s /aufs-umount.sh ] |
Hans-G?nter@22620 | 98 then |
pascal@2219 | 99 /etc/init.d/cupsd start || continue |
pascal@2219 | 100 fi |
Hans-G?nter@22620 | 101 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22620 | 102 then |
al@18716 | 103 cat >> "$1/etc/daemons.conf" <<EOT |
al@18716 | 104 # CUPS printing daemon options. |
al@18716 | 105 CUPSD_OPTIONS="" |
al@18716 | 106 |
al@18716 | 107 EOT |
pascal@2219 | 108 fi |
pascal@2219 | 109 } |
pascal@2219 | 110 |
pascal@2219 | 111 pre_remove() |
pascal@2219 | 112 { |
Hans-G?nter@24444 | 113 # Stop CUPS daemon before removing. |
al@18716 | 114 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@18716 | 115 : |
pascal@8875 | 116 } |
pascal@8875 | 117 |
pascal@8875 | 118 post_remove() |
pascal@8875 | 119 { |
al@18716 | 120 ln -s /bin/busybox "$1/usr/bin/lpr" |
pascal@8875 | 121 } |