Contents of /trunk/extras/cups/cups-2.1.3-r3.smage2
Parent Directory | Revision Log
Revision 28886 -
(show annotations)
(download)
Wed May 10 06:44:19 2017 UTC (7 years, 4 months ago) by niro
File size: 6424 byte(s)
Wed May 10 06:44:19 2017 UTC (7 years, 4 months ago) by niro
File size: 6424 byte(s)
-rebuild against poppler-0.54
1 | # $Id$ |
2 | |
3 | PNAME="cups" |
4 | PVER="2.1.3" |
5 | PBUILD="r3" |
6 | |
7 | SPLIT_PACKAGES="libcups cups" |
8 | |
9 | PCAT="net-print" |
10 | HOMEPAGE="http://www.cups.org/" |
11 | |
12 | LIB_DEPEND=">= virtual/glibc |
13 | >= app-crypt/gnutls-3.5 |
14 | >= media-libs/libpng-1.5 |
15 | >= media-libs/libtiff-4 |
16 | >= media-libs/libjpeg-8 |
17 | >= net-dns/avahi-0.6.31 |
18 | >= sys-libs/zlib-1.2.5 |
19 | >= sys-libs/libstdc++-6.3 |
20 | >= sys-apps/systemd-230" |
21 | |
22 | CUPS_DEPEND=">= sys-libs/pam-1.1 |
23 | >= sys-apps/acl-2.2 |
24 | >= sys-apps/dbus-1.10 |
25 | >= dev-libs/libusb-compat-0.1.3 |
26 | >= dev-libs/dbus-glib-0.108 |
27 | >= app-text/libpaper-1.1.24 |
28 | >= app-text/poppler-0.54" |
29 | |
30 | SDEPEND="${LIB_DEPEND} |
31 | ${CUPS_DEPEND} |
32 | >= sys-dev/automake-9 |
33 | >= sys-dev/autoconf-10" |
34 | |
35 | SRCFILE="${PNAME}-${PVER}-source.tar.bz2" |
36 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
37 | |
38 | sminclude mbuild mtools multilib systemd |
39 | msetfeature "!check" |
40 | |
41 | SRC_URI=( |
42 | http://cups.org/software/${PVER}/${SRCFILE} |
43 | mirror://${PNAME}/${SRCFILE} |
44 | mirror://${PNAME}/cups.conf.tmpd |
45 | mirror://${PNAME}/cups.logrotate |
46 | mirror://${PNAME}/cups.pam-systemauth |
47 | mirror://${PNAME}/${PNAME}-1.2.11-multilib.patch |
48 | mirror://${PNAME}/${PNAME}-2.1.1-systemd-socket.patch |
49 | mirror://${PNAME}/${PNAME}-1.5.0-build-fix.patch |
50 | mirror://${PNAME}/${PNAME}-2.0.3-dnssd-deviceid.patch |
51 | mirror://${PNAME}/${PNAME}-2.0.3-no-export-ssllibs.patch |
52 | mirror://${PNAME}/${PNAME}-2.0.3-no-gcrypt.patch |
53 | mirror://${PNAME}/${PNAME}-2.0.3-no-gzip-man.patch |
54 | mirror://${PNAME}/${PNAME}-2.0.3-statedir.patch |
55 | mirror://${PNAME}/${PNAME}-2.0.3-perms.patch |
56 | |
57 | ) |
58 | |
59 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download Stable' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'" |
60 | UP2DATE="updatecmd ${HOMEPAGE} | sed 's:-source::g' | firsttarball" |
61 | |
62 | split_info_libcups() |
63 | { |
64 | DESCRIPTION="cups: common unix printing system - client libraries and headers" |
65 | DEPEND="${LIB_DEPEND}" |
66 | } |
67 | |
68 | split_info_cups() |
69 | { |
70 | DESCRIPTION="cups: common unix printing system - service daemons." |
71 | DEPEND="== net-print/libcups-${PVER} |
72 | ${CUPS_DEPEND}" |
73 | } |
74 | |
75 | pkg_setup() |
76 | { |
77 | preinstall_cups |
78 | } |
79 | |
80 | src_prepare() |
81 | { |
82 | munpack ${SRCFILE} || die |
83 | |
84 | # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches |
85 | mpatch ${PNAME}-1.2.11-multilib.patch || die |
86 | |
87 | # adds systemd socket activation support |
88 | mpatch ${PNAME}-2.1.1-systemd-socket.patch || die |
89 | |
90 | # fix build, adds missing -lrt |
91 | mpatch ${PNAME}-1.5.0-build-fix.patch || die |
92 | |
93 | # mark DNSSD device-ids that have been guessed at with "FZY:1;" |
94 | mpatch ${PNAME}-2.0.3-dnssd-deviceid.patch || die |
95 | |
96 | # do not export SSL libs in cups-config |
97 | mpatch ${PNAME}-2.0.3-no-export-ssllibs.patch || die |
98 | |
99 | # do not export gcrypt function which are not used |
100 | mpatch ${PNAME}-2.0.3-no-gcrypt.patch || die |
101 | |
102 | # do not compress man pages |
103 | mpatch ${PNAME}-2.0.3-no-gzip-man.patch || die |
104 | |
105 | # move /var/run -> /run |
106 | mpatch ${PNAME}-2.0.3-statedir.patch || die |
107 | |
108 | # fix broken install permissions |
109 | mpatch ${PNAME}-2.0.3-perms.patch || die |
110 | |
111 | # set MaxLogSize to 0 to prevent using cups internal log rotation |
112 | sed -i -e '5i\ ' conf/cupsd.conf.in |
113 | sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in |
114 | sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in |
115 | |
116 | # non standard configure |
117 | all-abis aclocal -I config-scripts --force || die |
118 | all-abis autoconf --force || die |
119 | } |
120 | |
121 | src_compile() |
122 | { |
123 | mconfigure \ |
124 | --localstatedir=/var \ |
125 | --with-docdir=/usr/share/cups/html \ |
126 | --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \ |
127 | --with-cups-user=lp \ |
128 | --with-cups-group=lp \ |
129 | --with-system-groups=lpadmin \ |
130 | --enable-threads \ |
131 | --enable-pam \ |
132 | --enable-nls \ |
133 | --enable-dbus \ |
134 | --enable-png \ |
135 | --enable-jpeg \ |
136 | --enable-tiff \ |
137 | --enable-libpaper \ |
138 | --enable-avahi \ |
139 | --enable-ssl=yes \ |
140 | --enable-gnutls \ |
141 | --enable-raw-printing \ |
142 | --disable-slp \ |
143 | --disable-php \ |
144 | --disable-ldap \ |
145 | || die |
146 | |
147 | mmake || die |
148 | } |
149 | |
150 | src_install_libcups() |
151 | { |
152 | mmake BUILDROOT=${BINDIR} install-headers || die |
153 | mmake BUILDROOT=${BINDIR} install-libs || die |
154 | # install config utiliy so other packages can find the libs |
155 | # because there a no pkgconfig files |
156 | minstallexec cups-config || die |
157 | } |
158 | |
159 | src_install_cups() |
160 | { |
161 | mmake BUILDROOT=${BINDIR} install-data || die |
162 | mmake BUILDROOT=${BINDIR} install-exec || die |
163 | |
164 | # provided by libcups |
165 | mdelete /usr/bin/cups-config || die |
166 | |
167 | # gzip *all* ppd's not just few |
168 | find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die |
169 | |
170 | # remove 32bit serverbins and co on 64bit multilib systems |
171 | if [[ ${ARCH} = x86_64 ]] |
172 | then |
173 | if [[ -d ${BINDIR}/usr/lib/cups ]] |
174 | then |
175 | mdelete -r /usr/lib/cups || die |
176 | fi |
177 | fi |
178 | |
179 | # remove possible installed backup configs |
180 | find ${BINDIR}/etc -name "*.O" | xargs rm -f || die |
181 | find ${BINDIR}/etc -name "*.N" | xargs rm -f || die |
182 | |
183 | # tempfile creation |
184 | minstalltmp cups.conf.tmpd cups.conf || die |
185 | |
186 | # install logrotate config |
187 | minstalllog cups.logrotate cups || die |
188 | |
189 | # install pam config |
190 | minstallpam cups.pam-systemauth cups || die |
191 | |
192 | # ship some config files to keep many apps happy (javapps nxnode etc) |
193 | memptyfile /etc/cups/printers.conf || die |
194 | memptyfile /etc/cups/classes.conf || die |
195 | memptyfile /etc/cups/client.conf || die |
196 | memptyfile /etc/cups/subscriptions.conf || die |
197 | |
198 | # prevents uninstall from prior versions |
199 | mkeepdir /usr/share/cups/profiles || die |
200 | mkeepdir /usr/$(mlibdir)/cups/driver || die |
201 | mkeepdir /var/log/cups || die |
202 | mkeepdir /var/run/cups/certs || die |
203 | mkeepdir /var/spool/cups || die |
204 | mkeepdir /var/spool/cups/tmp || die |
205 | |
206 | # create a rss feed directory |
207 | mkeepdir /var/cache/cups/rss || die |
208 | mchown lp.lp /var/cache/cups/rss || die |
209 | mchmod 0740 /var/cache/cups/rss || die |
210 | |
211 | # create a ssl directory to store cacerts and to fix some samba issues |
212 | mkeepdir /etc/cups/ssl || die |
213 | mchown root:lp /etc/cups/ssl || die |
214 | mchmod 0700 /etc/cups/ssl || die |
215 | |
216 | # fix cupsd permisions |
217 | mchmod 0755 /usr/sbin/cupsd || die |
218 | |
219 | # install missing docs |
220 | minstalldocs CHANGES* CREDITS* LICENSE* README* || die |
221 | } |
222 | |
223 | preinstall_cups() |
224 | { |
225 | mgroupadd -o "-g 106" lpadmin |
226 | mgroupadd -o "-g 9" lp |
227 | museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp |
228 | } |
229 | |
230 | postinstall_cups() |
231 | { |
232 | # renamed cups services |
233 | if systemctl is-enabled cups.service &> /dev/null |
234 | then |
235 | systemctl disable cups.service |
236 | fi |
237 | if systemctl is-enabled cups.socket &> /dev/null |
238 | then |
239 | systemctl disable cups.socket |
240 | fi |
241 | if systemctl is-enabled cups.path &> /dev/null |
242 | then |
243 | systemctl disable cups.path |
244 | fi |
245 | |
246 | mstartunit org.cups.cupsd.service cupsd |
247 | mstartunit org.cups.cupsd.socket cupsd |
248 | } |
249 | |
250 | postremove_cups() |
251 | { |
252 | mstopunit org.cups.cupsd.service cupsd |
253 | mstopunit org.cups.cupsd.socket cupsd |
254 | } |