wok-next annotate cups/receipt @ rev 19783

Up receipts to v2 syntax: cook_copy_files & cook_copy_folders -> copy
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 18 04:38:10 2017 +0300 (2017-06-18)
parents 27e7c76d2c94
children 831ee4103c8f
rev   line source
pankso@632 1 # SliTaz package receipt.
pankso@632 2
pankso@632 3 PACKAGE="cups"
al@19681 4 VERSION="2.1.4"
pankso@632 5 CATEGORY="system-tools"
pankso@632 6 SHORT_DESC="Common UNIX Printing System."
erjo@784 7 MAINTAINER="erjo@slitaz.org"
pascal@15198 8 LICENSE="GPL2 LGPL2"
al@19681 9 WEB_SITE="https://www.cups.org/"
jozee@4933 10 TAGS="printer printing"
pankso@632 11
al@19681 12 TARBALL="$PACKAGE-$VERSION-source.tar.gz"
al@19681 13 WGET_URL="https://github.com/apple/cups/releases/download/release-$VERSION/$TARBALL"
al@19681 14
al@19681 15 DEPENDS="acl dbus libcups libgnutls libusb zlib"
al@19681 16 BUILD_DEPENDS="automake libusb-dev zlib-dev dbus-dev gnutls-dev perl python \
al@19681 17 acl-dev"
al@19681 18 SPLIT="libcups cups-doc"
slaxemulator@14621 19
pankso@632 20 # Rules to configure and make the package.
pankso@632 21 compile_rules()
pankso@632 22 {
al@19681 23 sed -i 's:555:755:g;s:444:644:g' Makedefs.in &&
al@19681 24 sed -i '/MAN.EXT/s:.gz::g' configure config-scripts/cups-manpages.m4 &&
al@19681 25 sed -i '/LIBGCRYPTCONFIG/d' config-scripts/cups-ssl.m4 &&
al@19681 26
al@19681 27 aclocal -I config-scripts &&
al@19681 28 autoconf -I config-scripts &&
al@19681 29
al@19681 30 CC=gcc \
pankso@632 31 ./configure \
pankso@664 32 --sysconfdir=/etc \
al@19681 33 --libdir=/usr/lib \
pankso@664 34 --localstatedir=/var \
al@19681 35 --disable-systemd \
al@19681 36 --with-rcdir=/tmp/cupsinit \
al@19681 37 --with-system-groups=lpadmin \
al@19681 38 --with-docdir=/usr/share/doc/cups-$VERSION \
pascal@1660 39 $CONFIGURE_ARGS &&
al@19681 40 make
al@19681 41 make BUILDROOT=$install install &&
al@19681 42 rm -rf $install/tmp &&
al@19681 43 ln -svnf ../doc/cups-$VERSION $install/usr/share/cups/doc-$VERSION
al@19681 44 echo "ServerName /var/run/cups/cups.sock" > $install/etc/cups/client.conf &&
al@19681 45
al@19681 46 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
al@19681 47 $install/usr/share/cups/templates/choose-uri.tmpl &&
al@19681 48 sed -i 's|htmlview|browser|' $install/usr/share/applications/cups.desktop
pankso@632 49 }
pankso@632 50
pankso@632 51 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@632 52 genpkg_rules()
pankso@632 53 {
al@19783 54 copy dbus-1/ bin/ sbin/ cups/ applications/ icons/ var/ *.so*
pankso@3601 55
al@19681 56 # -> cups-dev
al@19681 57 rm -f $fs/usr/bin/cups-config
al@19681 58 rm -rf $fs/usr/include
al@19681 59 # -> libcups
al@18716 60 rm -f $fs/usr/lib/libcups.so*
al@18716 61
pankso@632 62 # Daemon script
pankso@9697 63 cp -a $stuff/etc $fs
al@19681 64 chown -R root:root $fs/etc/init.d
pascal@19183 65 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf
pascal@14906 66
al@18716 67 # TazPanel link
pascal@14906 68 cp -a $stuff/var $fs
al@19681 69 chown -R root:root $fs/var/www
pascal@19181 70
pankso@632 71 }
pankso@632 72
pankso@632 73 post_install()
pankso@632 74 {
al@18716 75 # Start CUPS daemon and edit daemons.conf
al@18716 76 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
pascal@2219 77 /etc/init.d/cupsd start || continue
pascal@2219 78 fi
al@19681 79 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
al@18716 80 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
al@18716 81 cat >> "$1/etc/daemons.conf" <<EOT
al@18716 82 # CUPS printing daemon options.
al@18716 83 CUPSD_OPTIONS=""
al@18716 84
al@18716 85 EOT
pankso@632 86 fi
pankso@632 87 }
pankso@632 88
pankso@632 89 pre_remove()
pankso@632 90 {
al@18716 91 # Stop CUPS daemon before rm.
al@18716 92 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
al@18716 93 :
pascal@8875 94 }