wok annotate cups/receipt @ rev 25598

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 16 12:03:07 2023 +0000 (16 months ago)
parents 92bbd9147f9b
children
rev   line source
pankso@632 1 # SliTaz package receipt.
pankso@632 2
pankso@632 3 PACKAGE="cups"
Hans-G?nter@24444 4 VERSION="2.4.1"
pankso@632 5 CATEGORY="system-tools"
Hans-G?nter@22620 6 TAGS="printer printing"
pankso@632 7 SHORT_DESC="Common UNIX Printing System."
erjo@784 8 MAINTAINER="erjo@slitaz.org"
pascal@15198 9 LICENSE="GPL2 LGPL2"
pascal@20669 10 WEB_SITE="https://www.cups.org/"
pankso@632 11
Hans-G?nter@22620 12 TARBALL="$PACKAGE-$VERSION-source.tar.gz"
Hans-G?nter@24444 13 WGET_URL="https://github.com/OpenPrinting/$PACKAGE/releases/download/v$VERSION/$TARBALL"
Hans-G?nter@22620 14
Hans-G?nter@24444 15 SUGGESTED="cups-lang"
Hans-G?nter@22620 16 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl
Hans-G?nter@22906 17 libunistring libusb-compat poppler-apps"
Hans-G?nter@22620 18 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libgcrypt-dev
Hans-G?nter@22906 19 libgnutls libpng-dev libtasn1-dev libunistring-dev libusb-compat-dev
Hans-G?nter@22906 20 openssl-dev php-dev poppler-apps tiff-dev zlib-dev"
slaxemulator@14621 21
pascal@25598 22 # What is the latest version available today?
pascal@24055 23 current_version()
pascal@24055 24 {
pascal@24055 25 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
pascal@25598 26 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
pascal@24055 27 }
pascal@24055 28
pankso@632 29 # Rules to configure and make the package.
pankso@632 30 compile_rules()
pankso@632 31 {
Hans-G?nter@22620 32 # patch -Np1 -i $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 # --disable-slp
Hans-G?nter@22620 42 # --with-pdftops=pdftops
Hans-G?nter@22620 43
Hans-G?nter@22620 44 ./configure \
Hans-G?nter@22620 45 --prefix=/usr \
Hans-G?nter@22620 46 --sysconfdir=/etc \
Hans-G?nter@22620 47 --localstatedir=/var \
Hans-G?nter@22620 48 --mandir=/usr/share/man \
Hans-G?nter@22620 49 --enable-static \
Hans-G?nter@22620 50 --disable-pam \
Hans-G?nter@22620 51 --disable-gssapi \
Hans-G?nter@22620 52 --disable-acl \
Hans-G?nter@22620 53 --enable-dbus \
Hans-G?nter@22620 54 --with-dbusdir=/etc/dbus-1 \
Hans-G?nter@22620 55 --with-cups-user=nobody \
Hans-G?nter@22620 56 --with-cups-group=nogroup \
Hans-G?nter@22620 57 --with-languages="$LOCALE_PACK" \
pascal@1660 58 $CONFIGURE_ARGS &&
pascal@1660 59 make &&
Hans-G?nter@24444 60 make install BUILDROOT=$DESTDIR
Hans-G?nter@22620 61
Hans-G?nter@22620 62 cp -f $stuff/cups.desktop \
Hans-G?nter@22620 63 $install/usr/share/applications/cups.desktop
pankso@632 64 }
pankso@632 65
pankso@632 66 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@632 67 genpkg_rules()
pankso@632 68 {
Hans-G?nter@22620 69 mkdir -p $fs/etc
Hans-G?nter@22620 70 mkdir -p $fs/usr/lib
Hans-G?nter@22620 71 mkdir -p $fs/usr/share
pankso@3601 72
Hans-G?nter@22620 73 cp -a $install/etc/cups $fs/etc
Hans-G?nter@22620 74 cp -a $install/etc/dbus* $fs/etc
Hans-G?nter@22620 75 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22620 76 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@22620 77 cp -a $install/usr/lib/cups $fs/usr/lib
Hans-G?nter@24444 78 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@22620 79 cp -a $install/usr/share/cups $fs/usr/share
Hans-G?nter@22620 80 cp -a $install/usr/share/icons $fs/usr/share
Hans-G?nter@22620 81 cp -a $install/var $fs
pankso@3601 82
al@18716 83 # Remove files provided by cups-filters
Hans-G?nter@22620 84 rm -f $fs/usr/share/cups/banners/*
Hans-G?nter@22620 85 rm -f $fs/usr/share/cups/data/testprint
al@18716 86
al@18716 87 # Remove files provided by libcups
Hans-G?nter@22620 88 rm -f $fs/usr/lib/libcups.so*
al@18716 89
pankso@632 90 # Daemon script
Hans-G?nter@22620 91 cp -a $stuff/etc $fs
Hans-G?nter@24444 92 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
pascal@14906 93
al@18716 94 # TazPanel link
Hans-G?nter@22620 95 cp -a $stuff/var $fs
pascal@19181 96
pascal@19183 97 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
pascal@19181 98 $fs/usr/share/cups/templates/choose-uri.tmpl
pankso@632 99 }
pankso@632 100
pankso@632 101 post_install()
pankso@632 102 {
al@18716 103 # Start CUPS daemon and edit daemons.conf
Hans-G?nter@22620 104 if [ -z "$1" -a ! -s /aufs-umount.sh ]
Hans-G?nter@22620 105 then
pascal@2219 106 /etc/init.d/cupsd start || continue
pascal@2219 107 fi
pascal@19030 108 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
Hans-G?nter@22620 109 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"
Hans-G?nter@22620 110 then
al@18716 111 cat >> "$1/etc/daemons.conf" <<EOT
al@18716 112 # CUPS printing daemon options.
al@18716 113 CUPSD_OPTIONS=""
al@18716 114
al@18716 115 EOT
pankso@632 116 fi
Hans-G?nter@24444 117 echo "Add cupsd to RUN_DAEMONS in /etc/rcS.conf to start cupsd after SliTaz startup."
pankso@632 118 }
pankso@632 119
pankso@632 120 pre_remove()
pankso@632 121 {
Hans-G?nter@24444 122 # Stop CUPS daemon before removing.
al@18716 123 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
al@18716 124 :
pascal@8875 125 }
pascal@8875 126
pascal@8875 127 post_remove()
pascal@8875 128 {
pascal@19257 129 ln -fs /bin/busybox "$1/usr/bin/lpr"
pascal@8875 130 }