wok-next annotate cups/receipt @ rev 21159
updated diffutils (3.6 -> 3.7)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Feb 20 08:46:59 2019 +0100 (2019-02-20) |
parents | b9682d966530 |
children | 90ba80f6e497 |
rev | line source |
---|---|
al@19800 | 1 # SliTaz package receipt v2. |
pankso@632 | 2 |
pankso@632 | 3 PACKAGE="cups" |
al@19800 | 4 VERSION="2.2.2" |
pankso@632 | 5 CATEGORY="system-tools" |
al@19800 | 6 SHORT_DESC="Common UNIX Printing System" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15198 | 8 LICENSE="GPL2 LGPL2" |
al@19681 | 9 WEB_SITE="https://www.cups.org/" |
pankso@632 | 10 |
al@19800 | 11 TARBALL="cups-$VERSION-source.tar.gz" |
al@19800 | 12 WGET_URL="https://github.com/apple/cups/releases/download/v$VERSION/$TARBALL" |
al@19681 | 13 |
al@19800 | 14 BUILD_DEPENDS="automake libusb-dev zlib-dev acl-dev dbus-dev gnutls-dev perl \ |
pascal@20269 | 15 python pam pam-dev" |
al@21020 | 16 SPLIT="libcups $PACKAGE $PACKAGE-pam:pam $PACKAGE-doc $PACKAGE-dev" |
slaxemulator@14621 | 17 |
al@20443 | 18 compile_rules() { |
al@20534 | 19 case $SET in |
al@20534 | 20 '') SET_ARGS='--disable-pam';; |
al@20534 | 21 pam) SET_ARGS='--enable-pam';; |
al@20534 | 22 esac |
al@20534 | 23 |
al@19800 | 24 # gid 19 suggested by the BLFS is in use in SliTaz (by cdrom group), |
al@19800 | 25 # using 23 instead |
al@20292 | 26 addgroup -g 23 lpadmin |
al@19800 | 27 |
al@20292 | 28 sed -i 's:555:755:g;s:444:644:g' Makedefs.in |
al@20292 | 29 sed -i '/MAN.EXT/s:.gz::g' configure config-scripts/cups-manpages.m4 |
al@20292 | 30 sed -i '/LIBGCRYPTCONFIG/d' config-scripts/cups-ssl.m4 |
al@19681 | 31 |
al@20292 | 32 aclocal -I config-scripts |
al@20292 | 33 autoconf -I config-scripts |
al@19681 | 34 |
pascal@20269 | 35 cp -a $src $src-pam |
pascal@20269 | 36 |
al@19681 | 37 CC=gcc \ |
pankso@632 | 38 ./configure \ |
al@19681 | 39 --libdir=/usr/lib \ |
al@19681 | 40 --disable-systemd \ |
al@19681 | 41 --with-rcdir=/tmp/cupsinit \ |
al@19681 | 42 --with-system-groups=lpadmin \ |
al@19681 | 43 --with-docdir=/usr/share/doc/cups-$VERSION \ |
al@20534 | 44 $SET_ARGS \ |
pascal@1660 | 45 $CONFIGURE_ARGS && |
al@19800 | 46 make && |
al@20292 | 47 make BUILDROOT=$install install || return 1 |
al@19800 | 48 |
al@20534 | 49 rm -rf $install/tmp && |
al@19800 | 50 |
al@20534 | 51 ln -svnf ../doc/cups-$VERSION $install/usr/share/cups/doc-$VERSION |
al@19800 | 52 |
al@20534 | 53 echo "ServerName /var/run/cups/cups.sock" > $install/etc/cups/client.conf |
al@19681 | 54 |
al@20534 | 55 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ |
al@20534 | 56 $install/usr/share/cups/templates/choose-uri.tmpl |
al@20534 | 57 sed -i 's|htmlview|browser|' $install/usr/share/applications/cups.desktop |
al@20534 | 58 sed -i 's|^#Group .*|Group lp|' $install/etc/cups/cups-files.conf |
al@19800 | 59 |
al@20534 | 60 # Daemon script |
al@20534 | 61 cp -a $stuff/etc $install |
al@20534 | 62 chown -R root:root $install/etc |
al@20534 | 63 # TazPanel link |
al@20534 | 64 cp -a $stuff/var $install |
al@20534 | 65 chown -R root:root $install/var |
al@19800 | 66 |
al@20534 | 67 # Install ssl directory where to store the certs, solves some samba issues |
al@20534 | 68 install -dm700 -g lp $install/etc/cups/ssl |
al@19800 | 69 |
al@20534 | 70 # Install some more configuration files that will get filled by cupsd |
al@20534 | 71 touch $install/etc/cups/printers.conf |
al@20534 | 72 touch $install/etc/cups/classes.conf |
al@20534 | 73 touch $install/etc/cups/subscriptions.conf |
al@20534 | 74 chgrp -R lp $install/etc/cups |
al@19800 | 75 |
al@20534 | 76 # Comment out unnecessary PageLogFormat entry |
al@20534 | 77 sed -i -e 's:PageLogFormat:#PageLogFormat:' $install/etc/cups/cupsd.conf* |
al@19800 | 78 |
al@20534 | 79 # Change files permissions to be accessible via web interface - will be |
al@20534 | 80 # fixed in post_install |
al@20534 | 81 chmod -c o+r \ |
al@20534 | 82 $install/etc/cups/* \ |
al@20534 | 83 $install/usr/sbin/cupsd \ |
al@20534 | 84 $install/usr/lib/cups/backend/ipp \ |
al@20534 | 85 $install/usr/lib/cups/backend/lpd |
pankso@632 | 86 } |
pankso@632 | 87 |
al@20443 | 88 genpkg_rules() { |
al@19800 | 89 case $PACKAGE in |
al@19800 | 90 libcups) |
al@19800 | 91 copy libcups.so* |
al@19800 | 92 CAT="system-tools|common libraries" |
al@19800 | 93 TAGS="printer printing" |
al@19800 | 94 DEPENDS="libgnutls zlib" |
al@19800 | 95 ;; |
al@19800 | 96 cups) |
al@20292 | 97 copy @std @rm |
al@19800 | 98 DEPENDS="acl dbus libcups libgnutls libusb zlib" |
al@19800 | 99 CONFIG_FILES="/etc/cups/" |
al@19800 | 100 TAGS="printer printing" |
al@19800 | 101 ;; |
pascal@20269 | 102 cups-pam) |
al@20292 | 103 copy @std |
pascal@20272 | 104 rm -f $fs/usr/lib/libcups.so* |
al@20292 | 105 CAT="system-tools|with PAM support" |
pascal@20269 | 106 DEPENDS="acl dbus libcups libgnutls libusb zlib pam" |
pascal@20269 | 107 PROVIDE="cups:pam" |
pascal@20269 | 108 CONFIG_FILES="/etc/cups/" |
pascal@20269 | 109 TAGS="printer printing" |
pascal@20269 | 110 ;; |
al@19800 | 111 cups-doc) |
al@19800 | 112 # We need the doc for CSS, images and help in the web interface. |
al@19800 | 113 copy doc/ |
al@19800 | 114 CAT="docs|documentation" |
al@19800 | 115 DEPENDS="cups" |
al@19800 | 116 ;; |
al@19800 | 117 cups-dev) |
al@19800 | 118 copy @dev |
al@20537 | 119 DEPENDS="cups" |
al@19800 | 120 ;; |
al@19800 | 121 esac |
pankso@632 | 122 } |
pankso@632 | 123 |
al@19800 | 124 post_install_cups() { |
al@19800 | 125 # Start CUPS daemon |
al@18716 | 126 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then |
pascal@2219 | 127 /etc/init.d/cupsd start || continue |
pascal@2219 | 128 fi |
al@19800 | 129 |
al@19800 | 130 # Clean TazPanel menu cache |
al@19681 | 131 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null |
al@19800 | 132 |
al@19800 | 133 # Edit daemons.conf |
al@18716 | 134 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then |
al@18716 | 135 cat >> "$1/etc/daemons.conf" <<EOT |
al@18716 | 136 # CUPS printing daemon options. |
al@18716 | 137 CUPSD_OPTIONS="" |
al@18716 | 138 |
al@18716 | 139 EOT |
pankso@632 | 140 fi |
al@19800 | 141 |
al@19800 | 142 # Add lpadmin group |
al@19800 | 143 addgroup -g 23 lpadmin |
al@19800 | 144 |
al@19800 | 145 # Return permissions to previous state |
al@19800 | 146 chmod 640 $1/etc/cups/* |
al@19800 | 147 chmod 700 $1/usr/lib/cups/backend/ipp $1/usr/lib/cups/backend/lpd |
al@19800 | 148 chmod 500 $1/usr/sbin/cupsd |
pankso@632 | 149 } |
pankso@632 | 150 |
al@19800 | 151 pre_remove_cups() { |
al@18716 | 152 # Stop CUPS daemon before rm. |
al@18716 | 153 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@18716 | 154 : |
pascal@8875 | 155 } |
pascal@20269 | 156 |
pascal@20269 | 157 post_install_cups_pam() { |
al@20278 | 158 # Start CUPS daemon |
al@20278 | 159 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then |
al@20278 | 160 /etc/init.d/cupsd start || continue |
al@20278 | 161 fi |
al@20278 | 162 |
al@20278 | 163 # Clean TazPanel menu cache |
al@20278 | 164 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null |
al@20278 | 165 |
al@20278 | 166 # Edit daemons.conf |
al@20278 | 167 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then |
al@20278 | 168 cat >> "$1/etc/daemons.conf" <<EOT |
al@20278 | 169 # CUPS printing daemon options. |
al@20278 | 170 CUPSD_OPTIONS="" |
al@20278 | 171 |
al@20278 | 172 EOT |
al@20278 | 173 fi |
al@20278 | 174 |
al@20278 | 175 # Add lpadmin group |
al@20278 | 176 addgroup -g 23 lpadmin |
al@20278 | 177 |
al@20278 | 178 # Return permissions to previous state |
al@20278 | 179 chmod 640 $1/etc/cups/* |
al@20278 | 180 chmod 700 $1/usr/lib/cups/backend/ipp $1/usr/lib/cups/backend/lpd |
al@20278 | 181 chmod 500 $1/usr/sbin/cupsd |
pascal@20269 | 182 } |
pascal@20269 | 183 |
pascal@20269 | 184 pre_remove_cups_pam() { |
al@20278 | 185 # Stop CUPS daemon before rm. |
al@20278 | 186 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop |
al@20278 | 187 : |
pascal@20269 | 188 } |