wok-next annotate cups/receipt @ rev 19728
Up tcc (20170515)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 25 17:38:43 2017 +0200 (2017-05-25) |
parents | 13806712bef0 |
children | f463de72afe3 |
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@19681 | 54 cook_copy_folders dbus-1 bin sbin cups applications icons var |
al@19681 | 55 cook_copy_files *.so* |
pankso@3601 | 56 |
al@19681 | 57 # -> cups-dev |
al@19681 | 58 rm -f $fs/usr/bin/cups-config |
al@19681 | 59 rm -rf $fs/usr/include |
al@19681 | 60 # -> libcups |
al@18716 | 61 rm -f $fs/usr/lib/libcups.so* |
al@18716 | 62 |
pankso@632 | 63 # Daemon script |
pankso@9697 | 64 cp -a $stuff/etc $fs |
al@19681 | 65 chown -R root:root $fs/etc/init.d |
pascal@19183 | 66 sed -i 's|^#Group .*|Group lp|' $fs/etc/cups/cups-files.conf |
pascal@14906 | 67 |
al@18716 | 68 # TazPanel link |
pascal@14906 | 69 cp -a $stuff/var $fs |
al@19681 | 70 chown -R root:root $fs/var/www |
pascal@19181 | 71 |
pankso@632 | 72 } |
pankso@632 | 73 |
pankso@632 | 74 post_install() |
pankso@632 | 75 { |
al@18716 | 76 # Start CUPS daemon and edit daemons.conf |
al@18716 | 77 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then |
pascal@2219 | 78 /etc/init.d/cupsd start || continue |
pascal@2219 | 79 fi |
al@19681 | 80 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null |
al@18716 | 81 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then |
al@18716 | 82 cat >> "$1/etc/daemons.conf" <<EOT |
al@18716 | 83 # CUPS printing daemon options. |
al@18716 | 84 CUPSD_OPTIONS="" |
al@18716 | 85 |
al@18716 | 86 EOT |
pankso@632 | 87 fi |
pankso@632 | 88 } |
pankso@632 | 89 |
pankso@632 | 90 pre_remove() |
pankso@632 | 91 { |
al@18716 | 92 # Stop CUPS daemon before rm. |
al@18716 | 93 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@18716 | 94 : |
pascal@8875 | 95 } |