wok-next view cups/receipt @ rev 20727

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