wok annotate cups/receipt @ rev 25075
created recipe for alsa-ucm-conf
author | Hans-G?nter Theisgen |
---|---|
date | Tue Jun 14 07:07:03 2022 +0100 (2022-06-14) |
parents | 5ea0ce1cecc0 |
children | fe1b5660fdd1 |
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@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 |
pankso@632 | 28 # Rules to configure and make the package. |
pankso@632 | 29 compile_rules() |
pankso@632 | 30 { |
Hans-G?nter@22620 | 31 # patch -Np1 -i $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 # --disable-slp |
Hans-G?nter@22620 | 41 # --with-pdftops=pdftops |
Hans-G?nter@22620 | 42 |
Hans-G?nter@22620 | 43 ./configure \ |
Hans-G?nter@22620 | 44 --prefix=/usr \ |
Hans-G?nter@22620 | 45 --sysconfdir=/etc \ |
Hans-G?nter@22620 | 46 --localstatedir=/var \ |
Hans-G?nter@22620 | 47 --mandir=/usr/share/man \ |
Hans-G?nter@22620 | 48 --enable-static \ |
Hans-G?nter@22620 | 49 --disable-pam \ |
Hans-G?nter@22620 | 50 --disable-gssapi \ |
Hans-G?nter@22620 | 51 --disable-acl \ |
Hans-G?nter@22620 | 52 --enable-dbus \ |
Hans-G?nter@22620 | 53 --with-dbusdir=/etc/dbus-1 \ |
Hans-G?nter@22620 | 54 --with-cups-user=nobody \ |
Hans-G?nter@22620 | 55 --with-cups-group=nogroup \ |
Hans-G?nter@22620 | 56 --with-languages="$LOCALE_PACK" \ |
pascal@1660 | 57 $CONFIGURE_ARGS && |
pascal@1660 | 58 make && |
Hans-G?nter@24444 | 59 make install BUILDROOT=$DESTDIR |
Hans-G?nter@22620 | 60 |
Hans-G?nter@22620 | 61 cp -f $stuff/cups.desktop \ |
Hans-G?nter@22620 | 62 $install/usr/share/applications/cups.desktop |
pankso@632 | 63 } |
pankso@632 | 64 |
pankso@632 | 65 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@632 | 66 genpkg_rules() |
pankso@632 | 67 { |
Hans-G?nter@22620 | 68 mkdir -p $fs/etc |
Hans-G?nter@22620 | 69 mkdir -p $fs/usr/lib |
Hans-G?nter@22620 | 70 mkdir -p $fs/usr/share |
pankso@3601 | 71 |
Hans-G?nter@22620 | 72 cp -a $install/etc/cups $fs/etc |
Hans-G?nter@22620 | 73 cp -a $install/etc/dbus* $fs/etc |
Hans-G?nter@22620 | 74 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22620 | 75 cp -a $install/usr/lib/*.so* $fs/usr/lib |
Hans-G?nter@22620 | 76 cp -a $install/usr/lib/cups $fs/usr/lib |
Hans-G?nter@24444 | 77 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@22620 | 78 cp -a $install/usr/share/cups $fs/usr/share |
Hans-G?nter@22620 | 79 cp -a $install/usr/share/icons $fs/usr/share |
Hans-G?nter@22620 | 80 cp -a $install/var $fs |
pankso@3601 | 81 |
al@18716 | 82 # Remove files provided by cups-filters |
Hans-G?nter@22620 | 83 rm -f $fs/usr/share/cups/banners/* |
Hans-G?nter@22620 | 84 rm -f $fs/usr/share/cups/data/testprint |
al@18716 | 85 |
al@18716 | 86 # Remove files provided by libcups |
Hans-G?nter@22620 | 87 rm -f $fs/usr/lib/libcups.so* |
al@18716 | 88 |
pankso@632 | 89 # Daemon script |
Hans-G?nter@22620 | 90 cp -a $stuff/etc $fs |
Hans-G?nter@24444 | 91 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf |
pascal@14906 | 92 |
al@18716 | 93 # TazPanel link |
Hans-G?nter@22620 | 94 cp -a $stuff/var $fs |
pascal@19181 | 95 |
pascal@19183 | 96 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ |
pascal@19181 | 97 $fs/usr/share/cups/templates/choose-uri.tmpl |
pankso@632 | 98 } |
pankso@632 | 99 |
pankso@632 | 100 post_install() |
pankso@632 | 101 { |
al@18716 | 102 # Start CUPS daemon and edit daemons.conf |
Hans-G?nter@22620 | 103 if [ -z "$1" -a ! -s /aufs-umount.sh ] |
Hans-G?nter@22620 | 104 then |
pascal@2219 | 105 /etc/init.d/cupsd start || continue |
pascal@2219 | 106 fi |
pascal@19030 | 107 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null |
Hans-G?nter@22620 | 108 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22620 | 109 then |
al@18716 | 110 cat >> "$1/etc/daemons.conf" <<EOT |
al@18716 | 111 # CUPS printing daemon options. |
al@18716 | 112 CUPSD_OPTIONS="" |
al@18716 | 113 |
al@18716 | 114 EOT |
pankso@632 | 115 fi |
Hans-G?nter@24444 | 116 echo "Add cupsd to RUN_DAEMONS in /etc/rcS.conf to start cupsd after SliTaz startup." |
pankso@632 | 117 } |
pankso@632 | 118 |
pankso@632 | 119 pre_remove() |
pankso@632 | 120 { |
Hans-G?nter@24444 | 121 # Stop CUPS daemon before removing. |
al@18716 | 122 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@18716 | 123 : |
pascal@8875 | 124 } |
pascal@8875 | 125 |
pascal@8875 | 126 post_remove() |
pascal@8875 | 127 { |
pascal@19257 | 128 ln -fs /bin/busybox "$1/usr/bin/lpr" |
pascal@8875 | 129 } |