wok-next view cups/receipt @ rev 20443

The rest of my "home work" for update many packages (up to Xorg, GTK and Openbox) for Next and mainly for Next64. Since this point this repository is open for commits. Many errors are expected due to harfbuzz-freetype dependency loop...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Feb 24 16:17:33 2018 +0200 (2018-02-24)
parents d3adbeea3a9f
children 757d032c55c7
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 cups-doc cups-dev"
18 compile_rules() {
19 # gid 19 suggested by the BLFS is in use in SliTaz (by cdrom group),
20 # using 23 instead
21 addgroup -g 23 lpadmin
23 sed -i 's:555:755:g;s:444:644:g' Makedefs.in
24 sed -i '/MAN.EXT/s:.gz::g' configure config-scripts/cups-manpages.m4
25 sed -i '/LIBGCRYPTCONFIG/d' config-scripts/cups-ssl.m4
27 aclocal -I config-scripts
28 autoconf -I config-scripts
30 cp -a $src $src-pam
32 CC=gcc \
33 ./configure \
34 --sysconfdir=/etc \
35 --libdir=/usr/lib \
36 --localstatedir=/var \
37 --disable-pam \
38 --disable-systemd \
39 --with-rcdir=/tmp/cupsinit \
40 --with-system-groups=lpadmin \
41 --with-docdir=/usr/share/doc/cups-$VERSION \
42 $CONFIGURE_ARGS &&
43 make &&
44 make BUILDROOT=$install install || return 1
46 cd $src-pam
47 CC=gcc \
48 ./configure \
49 --sysconfdir=/etc \
50 --libdir=/usr/lib \
51 --localstatedir=/var \
52 --enable-pam \
53 --disable-systemd \
54 --with-rcdir=/tmp/cupsinit \
55 --with-system-groups=lpadmin \
56 --with-docdir=/usr/share/doc/cups-$VERSION \
57 $CONFIGURE_ARGS &&
58 make &&
59 make BUILDROOT=$install-pam install || return 1
61 for inst in $install $install-pam ; do
62 rm -rf $inst/tmp &&
64 ln -svnf ../doc/cups-$VERSION $inst/usr/share/cups/doc-$VERSION
66 echo "ServerName /var/run/cups/cups.sock" > $inst/etc/cups/client.conf &&
68 sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \
69 $inst/usr/share/cups/templates/choose-uri.tmpl &&
70 sed -i 's|htmlview|browser|' $inst/usr/share/applications/cups.desktop &&
71 sed -i 's|^#Group .*|Group lp|' $inst/etc/cups/cups-files.conf &&
73 # Daemon script
74 cp -a $stuff/etc $inst &&
75 chown -R root:root $inst/etc &&
76 # TazPanel link
77 cp -a $stuff/var $inst &&
78 chown -R root:root $inst/var &&
80 # Install ssl directory where to store the certs, solves some samba issues
81 install -dm700 -g lp $inst/etc/cups/ssl &&
83 # Install some more configuration files that will get filled by cupsd
84 touch $inst/etc/cups/printers.conf &&
85 touch $inst/etc/cups/classes.conf &&
86 touch $inst/etc/cups/subscriptions.conf &&
87 chgrp -R lp $inst/etc/cups &&
89 # Comment out unnecessary PageLogFormat entry
90 sed -i -e 's:PageLogFormat:#PageLogFormat:' $inst/etc/cups/cupsd.conf* &&
92 # Change files permissions to be accessible via web interface - will be
93 # fixed in post_install
94 chmod -c o+r $inst/etc/cups/* $inst/usr/sbin/cupsd \
95 $inst/usr/lib/cups/backend/ipp $inst/usr/lib/cups/backend/lpd
96 done
97 }
99 genpkg_rules() {
100 case $PACKAGE in
101 libcups)
102 copy libcups.so*
103 CAT="system-tools|common libraries"
104 TAGS="printer printing"
105 DEPENDS="libgnutls zlib"
106 ;;
107 cups)
108 copy @std @rm
109 DEPENDS="acl dbus libcups libgnutls libusb zlib"
110 CONFIG_FILES="/etc/cups/"
111 TAGS="printer printing"
112 ;;
113 cups-pam)
114 install=$install-pam \
115 copy @std
116 rm -f $fs/usr/lib/libcups.so*
117 CAT="system-tools|with PAM support"
118 DEPENDS="acl dbus libcups libgnutls libusb zlib pam"
119 PROVIDE="cups:pam"
120 CONFIG_FILES="/etc/cups/"
121 TAGS="printer printing"
122 ;;
123 cups-doc)
124 # We need the doc for CSS, images and help in the web interface.
125 copy doc/
126 CAT="docs|documentation"
127 DEPENDS="cups"
128 ;;
129 cups-dev)
130 copy @dev
131 ;;
132 esac
133 }
135 post_install_cups() {
136 # Start CUPS daemon
137 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
138 /etc/init.d/cupsd start || continue
139 fi
141 # Clean TazPanel menu cache
142 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
144 # Edit daemons.conf
145 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
146 cat >> "$1/etc/daemons.conf" <<EOT
147 # CUPS printing daemon options.
148 CUPSD_OPTIONS=""
150 EOT
151 fi
153 # Add lpadmin group
154 addgroup -g 23 lpadmin
156 # Return permissions to previous state
157 chmod 640 $1/etc/cups/*
158 chmod 700 $1/usr/lib/cups/backend/ipp $1/usr/lib/cups/backend/lpd
159 chmod 500 $1/usr/sbin/cupsd
160 }
162 pre_remove_cups() {
163 # Stop CUPS daemon before rm.
164 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
165 :
166 }
168 post_install_cups_pam() {
169 # Start CUPS daemon
170 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
171 /etc/init.d/cupsd start || continue
172 fi
174 # Clean TazPanel menu cache
175 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
177 # Edit daemons.conf
178 if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then
179 cat >> "$1/etc/daemons.conf" <<EOT
180 # CUPS printing daemon options.
181 CUPSD_OPTIONS=""
183 EOT
184 fi
186 # Add lpadmin group
187 addgroup -g 23 lpadmin
189 # Return permissions to previous state
190 chmod 640 $1/etc/cups/*
191 chmod 700 $1/usr/lib/cups/backend/ipp $1/usr/lib/cups/backend/lpd
192 chmod 500 $1/usr/sbin/cupsd
193 }
195 pre_remove_cups_pam() {
196 # Stop CUPS daemon before rm.
197 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop
198 :
199 }