wok annotate cups/receipt @ rev 24394
created recipe for python-distutils-extra
author | Hans-G?nter Theisgen |
---|---|
date | Tue Feb 08 10:09:54 2022 +0100 (2022-02-08) |
parents | 37d8597570cc |
children | 92bbd9147f9b |
rev | line source |
---|---|
pankso@632 | 1 # SliTaz package receipt. |
pankso@632 | 2 |
pankso@632 | 3 PACKAGE="cups" |
Hans-G?nter@22620 | 4 VERSION="2.3.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@22620 | 13 WGET_URL="https://github.com/apple/$PACKAGE/releases/download/v$VERSION/$TARBALL" |
Hans-G?nter@22620 | 14 |
Hans-G?nter@22620 | 15 DEPENDS="cups-doc cups-filters dbus libcomerr libcups libkrb5 libssl |
Hans-G?nter@22906 | 16 libunistring libusb-compat poppler-apps" |
Hans-G?nter@22620 | 17 BUILD_DEPENDS="acl-dev dbus-dev gnutls-dev jpeg-dev libgcrypt-dev |
Hans-G?nter@22906 | 18 libgnutls libpng-dev libtasn1-dev libunistring-dev libusb-compat-dev |
Hans-G?nter@22906 | 19 openssl-dev php-dev poppler-apps tiff-dev zlib-dev" |
slaxemulator@14621 | 20 |
pascal@24055 | 21 current_version() |
pascal@24055 | 22 { |
pascal@24055 | 23 wget -O - ${WGET_URL%/down*} 2>/dev/null | \ |
pascal@24055 | 24 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 25 } |
pascal@24055 | 26 |
pankso@632 | 27 # Rules to configure and make the package. |
pankso@632 | 28 compile_rules() |
pankso@632 | 29 { |
Hans-G?nter@22620 | 30 # patch -Np1 -i $stuff/install-sh.u |
Hans-G?nter@22620 | 31 |
Hans-G?nter@22620 | 32 export LDFLAGS="$LDFLAGS -lrt" |
Hans-G?nter@22620 | 33 |
Hans-G?nter@22620 | 34 # Set list of wanted locales in LOCALE_PACK |
Hans-G?nter@22620 | 35 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
Hans-G?nter@22620 | 36 |
Hans-G?nter@22620 | 37 # <= 2.0.2 unrecognised |
Hans-G?nter@22620 | 38 # --disable-ldap |
Hans-G?nter@22620 | 39 # --disable-slp |
Hans-G?nter@22620 | 40 # --with-pdftops=pdftops |
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 --disable-pam \ |
Hans-G?nter@22620 | 49 --disable-gssapi \ |
Hans-G?nter@22620 | 50 --disable-acl \ |
Hans-G?nter@22620 | 51 --enable-dbus \ |
Hans-G?nter@22620 | 52 --with-dbusdir=/etc/dbus-1 \ |
Hans-G?nter@22620 | 53 --with-cups-user=nobody \ |
Hans-G?nter@22620 | 54 --with-cups-group=nogroup \ |
Hans-G?nter@22620 | 55 --with-languages="$LOCALE_PACK" \ |
pascal@1660 | 56 $CONFIGURE_ARGS && |
pascal@1660 | 57 make && |
slaxemulator@14621 | 58 make BUILDROOT=$DESTDIR install |
Hans-G?nter@22620 | 59 |
Hans-G?nter@22620 | 60 cp -f $stuff/cups.desktop \ |
Hans-G?nter@22620 | 61 $install/usr/share/applications/cups.desktop |
pankso@632 | 62 } |
pankso@632 | 63 |
pankso@632 | 64 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@632 | 65 genpkg_rules() |
pankso@632 | 66 { |
Hans-G?nter@22620 | 67 mkdir -p $fs/etc |
Hans-G?nter@22620 | 68 mkdir -p $fs/usr/lib |
Hans-G?nter@22620 | 69 mkdir -p $fs/usr/share |
pankso@3601 | 70 |
Hans-G?nter@22620 | 71 cp -a $install/etc/cups $fs/etc |
Hans-G?nter@22620 | 72 cp -a $install/etc/dbus* $fs/etc |
Hans-G?nter@22620 | 73 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22620 | 74 cp -a $install/usr/sbin $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@22620 | 77 cp -a $install/usr/share/cups $fs/usr/share |
Hans-G?nter@22620 | 78 cp -a $install/usr/share/icons $fs/usr/share |
Hans-G?nter@22620 | 79 cp -a $install/var $fs |
pankso@3601 | 80 |
al@18716 | 81 # Remove files provided by cups-filters |
Hans-G?nter@22620 | 82 rm -f $fs/usr/share/cups/banners/* |
Hans-G?nter@22620 | 83 rm -f $fs/usr/share/cups/data/testprint |
al@18716 | 84 |
al@18716 | 85 # Remove files provided by libcups |
Hans-G?nter@22620 | 86 rm -f $fs/usr/lib/libcups.so* |
al@18716 | 87 |
pankso@632 | 88 # Daemon script |
Hans-G?nter@22620 | 89 cp -a $stuff/etc $fs |
pascal@19183 | 90 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf |
pascal@14906 | 91 |
al@18716 | 92 # TazPanel link |
Hans-G?nter@22620 | 93 cp -a $stuff/var $fs |
pascal@19181 | 94 |
pascal@19183 | 95 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ |
pascal@19181 | 96 $fs/usr/share/cups/templates/choose-uri.tmpl |
pankso@632 | 97 } |
pankso@632 | 98 |
pankso@632 | 99 post_install() |
pankso@632 | 100 { |
al@18716 | 101 # Start CUPS daemon and edit daemons.conf |
Hans-G?nter@22620 | 102 if [ -z "$1" -a ! -s /aufs-umount.sh ] |
Hans-G?nter@22620 | 103 then |
pascal@2219 | 104 /etc/init.d/cupsd start || continue |
pascal@2219 | 105 fi |
pascal@19030 | 106 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null |
Hans-G?nter@22620 | 107 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22620 | 108 then |
al@18716 | 109 cat >> "$1/etc/daemons.conf" <<EOT |
al@18716 | 110 # CUPS printing daemon options. |
al@18716 | 111 CUPSD_OPTIONS="" |
al@18716 | 112 |
al@18716 | 113 EOT |
pankso@632 | 114 fi |
pankso@632 | 115 } |
pankso@632 | 116 |
pankso@632 | 117 pre_remove() |
pankso@632 | 118 { |
Hans-G?nter@22620 | 119 # Stop CUPS daemon before remove. |
al@18716 | 120 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@18716 | 121 : |
pascal@8875 | 122 } |
pascal@8875 | 123 |
pascal@8875 | 124 post_remove() |
pascal@8875 | 125 { |
pascal@19257 | 126 ln -fs /bin/busybox "$1/usr/bin/lpr" |
pascal@8875 | 127 } |