1 |
dilfridge 12/04/26 21:51:03 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: cups-1.5.2-r4.ebuild cups-1.5.2-r20.ebuild |
5 |
Removed: cups-1.5.2-r3.ebuild |
6 |
Log: |
7 |
Copy -r3 unchanged to -r20; cleanse -r3 of all things systemd and make it -r4 for stabilization |
8 |
|
9 |
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64, RepoMan options: --force) |
10 |
|
11 |
Revision Changes Path |
12 |
1.466 net-print/cups/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.466&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?rev=1.466&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/ChangeLog?r1=1.465&r2=1.466 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v |
21 |
retrieving revision 1.465 |
22 |
retrieving revision 1.466 |
23 |
diff -u -r1.465 -r1.466 |
24 |
--- ChangeLog 26 Apr 2012 12:15:30 -0000 1.465 |
25 |
+++ ChangeLog 26 Apr 2012 21:51:03 -0000 1.466 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for net-print/cups |
28 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.465 2012/04/26 12:15:30 scarabeus Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.466 2012/04/26 21:51:03 dilfridge Exp $ |
31 |
+ |
32 |
+*cups-1.5.2-r20 (26 Apr 2012) |
33 |
+*cups-1.5.2-r4 (26 Apr 2012) |
34 |
+ |
35 |
+ 26 Apr 2012; Andreas K. Huettel <dilfridge@g.o> +cups-1.5.2-r20.ebuild, |
36 |
+ +cups-1.5.2-r4.ebuild, -cups-1.5.2-r3.ebuild: |
37 |
+ Copy -r3 unchanged to -r20; cleanse -r3 of all things systemd and make it -r4 |
38 |
+ for stabilization |
39 |
|
40 |
26 Apr 2012; Tomáš Chvátal <scarabeus@g.o> cups-1.5.2-r3.ebuild: |
41 |
Prefixy. |
42 |
|
43 |
|
44 |
|
45 |
1.1 net-print/cups/cups-1.5.2-r4.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.2-r4.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.2-r4.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: cups-1.5.2-r4.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2012 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.5.2-r4.ebuild,v 1.1 2012/04/26 21:51:03 dilfridge Exp $ |
55 |
|
56 |
EAPI=4 |
57 |
|
58 |
PYTHON_DEPEND="python? 2:2.5" |
59 |
|
60 |
inherit autotools eutils fdo-mime gnome2-utils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2 |
61 |
|
62 |
MY_P=${P/_} |
63 |
MY_PV=${PV/_} |
64 |
|
65 |
DESCRIPTION="The Common Unix Printing System" |
66 |
HOMEPAGE="http://www.cups.org/" |
67 |
SRC_URI="mirror://easysw/${PN}/${MY_PV}/${MY_P}-source.tar.bz2 |
68 |
http://dev.gentoo.org/~dilfridge/distfiles/${P}-ipp-r8950.patch.bz2 |
69 |
http://dev.gentoo.org/~dilfridge/distfiles/${P}-avahi.patch.bz2 |
70 |
" |
71 |
|
72 |
LICENSE="GPL-2" |
73 |
SLOT="0" |
74 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86" |
75 |
IUSE="acl avahi dbus debug +filters gnutls java +jpeg kerberos ldap pam perl |
76 |
+png python slp +ssl static-libs +threads +tiff usb X xinetd" |
77 |
|
78 |
LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW" |
79 |
for X in ${LANGS} ; do |
80 |
IUSE="${IUSE} linguas_${X}" |
81 |
done |
82 |
|
83 |
RDEPEND=" |
84 |
app-text/libpaper |
85 |
acl? ( |
86 |
kernel_linux? ( |
87 |
sys-apps/acl |
88 |
sys-apps/attr |
89 |
) |
90 |
) |
91 |
dbus? ( sys-apps/dbus ) |
92 |
java? ( >=virtual/jre-1.6 ) |
93 |
jpeg? ( virtual/jpeg:0 ) |
94 |
kerberos? ( virtual/krb5 ) |
95 |
ldap? ( net-nds/openldap[ssl?,gnutls?] ) |
96 |
pam? ( virtual/pam ) |
97 |
perl? ( dev-lang/perl ) |
98 |
png? ( >=media-libs/libpng-1.4.3:0 ) |
99 |
slp? ( >=net-libs/openslp-1.0.4 ) |
100 |
ssl? ( |
101 |
gnutls? ( |
102 |
dev-libs/libgcrypt |
103 |
net-libs/gnutls |
104 |
) |
105 |
!gnutls? ( >=dev-libs/openssl-0.9.8g ) |
106 |
) |
107 |
tiff? ( >=media-libs/tiff-3.5.5:0 ) |
108 |
usb? ( virtual/libusb:0 ) |
109 |
X? ( x11-misc/xdg-utils ) |
110 |
xinetd? ( sys-apps/xinetd ) |
111 |
" |
112 |
|
113 |
DEPEND="${RDEPEND} |
114 |
dev-util/pkgconfig |
115 |
" |
116 |
|
117 |
PDEPEND=" |
118 |
app-text/ghostscript-gpl[cups] |
119 |
>=app-text/poppler-0.12.3-r3[utils] |
120 |
filters? ( net-print/foomatic-filters ) |
121 |
" |
122 |
|
123 |
REQUIRED_USE="gnutls? ( ssl )" |
124 |
|
125 |
# upstream includes an interactive test which is a nono for gentoo |
126 |
RESTRICT="test" |
127 |
|
128 |
S="${WORKDIR}/${MY_P}" |
129 |
|
130 |
pkg_setup() { |
131 |
enewgroup lp |
132 |
enewuser lp -1 -1 -1 lp |
133 |
enewgroup lpadmin 106 |
134 |
|
135 |
# python 3 is no-go |
136 |
if use python; then |
137 |
python_set_active_version 2 |
138 |
python_pkg_setup |
139 |
fi |
140 |
|
141 |
if use kernel_linux; then |
142 |
linux-info_pkg_setup |
143 |
if ! linux_config_exists; then |
144 |
ewarn "Can't check the linux kernel configuration." |
145 |
ewarn "You might have some incompatible options enabled." |
146 |
else |
147 |
# recheck that we don't have usblp to collide with libusb |
148 |
if use usb; then |
149 |
if linux_chkconfig_present USB_PRINTER; then |
150 |
eerror "Your usb printers will be managed via libusb. In this case, " |
151 |
eerror "${P} requires the USB_PRINTER support disabled." |
152 |
eerror "Please disable it:" |
153 |
eerror " CONFIG_USB_PRINTER=n" |
154 |
eerror "in /usr/src/linux/.config or" |
155 |
eerror " Device Drivers --->" |
156 |
eerror " USB support --->" |
157 |
eerror " [ ] USB Printer support" |
158 |
eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)." |
159 |
fi |
160 |
else |
161 |
#here we should warn user that he should enable it so he can print |
162 |
if ! linux_chkconfig_present USB_PRINTER; then |
163 |
ewarn "If you plan to use USB printers you should enable the USB_PRINTER" |
164 |
ewarn "support in your kernel." |
165 |
ewarn "Please enable it:" |
166 |
ewarn " CONFIG_USB_PRINTER=y" |
167 |
ewarn "in /usr/src/linux/.config or" |
168 |
ewarn " Device Drivers --->" |
169 |
ewarn " USB support --->" |
170 |
ewarn " [*] USB Printer support" |
171 |
ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." |
172 |
fi |
173 |
fi |
174 |
fi |
175 |
fi |
176 |
} |
177 |
|
178 |
src_prepare() { |
179 |
# various build time fixes |
180 |
epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch" |
181 |
epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch" |
182 |
epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
183 |
epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch" |
184 |
epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch" |
185 |
epatch "${FILESDIR}/${PN}-1.5.2-linkperl.patch" |
186 |
epatch "${FILESDIR}/${PN}-1.5.2-threads.patch" |
187 |
epatch "${FILESDIR}/${PN}-1.5.2-threads2.patch" |
188 |
|
189 |
# revert ipp backend to 1.4 state, as ubuntu and debian |
190 |
epatch "${DISTDIR}/${PN}-1.5.2-ipp-r8950.patch.bz2" |
191 |
|
192 |
# avahi support from debian |
193 |
epatch "${DISTDIR}/${PN}-1.5.2-avahi.patch.bz2" |
194 |
|
195 |
# browsing off by default |
196 |
epatch "${FILESDIR}/${PN}-1.5.2-browsing.patch" |
197 |
|
198 |
AT_M4DIR=config-scripts eaclocal |
199 |
eautoconf |
200 |
} |
201 |
|
202 |
src_configure() { |
203 |
export DSOFLAGS="${LDFLAGS}" |
204 |
|
205 |
# locale support |
206 |
strip-linguas ${LANGS} |
207 |
if [ -z "${LINGUAS}" ] ; then |
208 |
export LINGUAS=none |
209 |
fi |
210 |
|
211 |
local myconf |
212 |
if use ssl ; then |
213 |
myconf+=" |
214 |
$(use_enable gnutls) |
215 |
$(use_enable !gnutls openssl) |
216 |
" |
217 |
else |
218 |
myconf+=" |
219 |
--disable-gnutls |
220 |
--disable-openssl |
221 |
" |
222 |
fi |
223 |
|
224 |
econf \ |
225 |
--libdir=/usr/$(get_libdir) \ |
226 |
--localstatedir=/var \ |
227 |
--with-cups-user=lp \ |
228 |
--with-cups-group=lp \ |
229 |
--with-docdir=/usr/share/cups/html \ |
230 |
--with-languages="${LINGUAS}" \ |
231 |
--with-pdftops=/usr/bin/pdftops \ |
232 |
--with-system-groups=lpadmin \ |
233 |
$(use_enable acl) \ |
234 |
$(use_enable avahi) \ |
235 |
$(use_enable dbus) \ |
236 |
$(use_enable debug) \ |
237 |
$(use_enable debug debug-guards) \ |
238 |
$(use_enable jpeg) \ |
239 |
$(use_enable kerberos gssapi) \ |
240 |
$(use_enable ldap) \ |
241 |
$(use_enable pam) \ |
242 |
$(use_enable png) \ |
243 |
$(use_enable slp) \ |
244 |
$(use_enable static-libs static) \ |
245 |
$(use_enable threads) \ |
246 |
$(use_enable tiff) \ |
247 |
$(use_enable usb libusb) \ |
248 |
$(use_with java) \ |
249 |
$(use_with perl) \ |
250 |
--without-php \ |
251 |
$(use_with python) \ |
252 |
$(use_with xinetd xinetd /etc/xinetd.d) \ |
253 |
--enable-libpaper \ |
254 |
--disable-dnssd \ |
255 |
${myconf} |
256 |
|
257 |
# install in /usr/libexec always, instead of using /usr/lib/cups, as that |
258 |
# makes more sense when facing multilib support. |
259 |
sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die |
260 |
sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die |
261 |
sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die |
262 |
} |
263 |
|
264 |
src_compile() { |
265 |
emake |
266 |
|
267 |
if use perl ; then |
268 |
cd "${S}"/scripting/perl |
269 |
perl-module_src_prep |
270 |
perl-module_src_compile |
271 |
fi |
272 |
} |
273 |
|
274 |
src_install() { |
275 |
emake BUILDROOT="${D}" install |
276 |
dodoc {CHANGES,CREDITS,README}.txt |
277 |
|
278 |
if use perl ; then |
279 |
pushd scripting/perl > /dev/null |
280 |
perl-module_src_install |
281 |
fixlocalpod |
282 |
popd > /dev/null |
283 |
fi |
284 |
|
285 |
# clean out cups init scripts |
286 |
rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
287 |
|
288 |
# install our init script |
289 |
local neededservices |
290 |
use dbus && neededservices+=" dbus" |
291 |
[[ -n ${neededservices} ]] && neededservices="need${neededservices}" |
292 |
cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die |
293 |
sed -i \ |
294 |
-e "s/@neededservices@/$neededservices/" \ |
295 |
"${T}"/cupsd || die |
296 |
doinitd "${T}"/cupsd |
297 |
|
298 |
# install our pam script |
299 |
pamd_mimic_system cups auth account |
300 |
|
301 |
if use xinetd ; then |
302 |
# correct path |
303 |
sed -i \ |
304 |
-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
305 |
"${ED}"/etc/xinetd.d/cups-lpd || die |
306 |
# it is safer to disable this by default, bug #137130 |
307 |
grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
308 |
{ sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
309 |
# write permission for file owner (root), bug #296221 |
310 |
fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
311 |
else |
312 |
rm -rf "${ED}"/etc/xinetd.d |
313 |
fi |
314 |
|
315 |
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
316 |
/var/cache/cups /var/cache/cups/rss /var/log/cups \ |
317 |
/var/spool/cups/tmp |
318 |
|
319 |
keepdir /etc/cups/{interfaces,ppd,ssl} |
320 |
|
321 |
use X || rm -r "${ED}"/usr/share/applications |
322 |
|
323 |
# create /etc/cups/client.conf, bug #196967 and #266678 |
324 |
echo "ServerName /var/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
325 |
} |
326 |
|
327 |
pkg_preinst() { |
328 |
gnome2_icon_savelist |
329 |
} |
330 |
|
331 |
pkg_postinst() { |
332 |
# Update desktop file database and gtk icon cache (bug 370059) |
333 |
gnome2_icon_cache_update |
334 |
fdo-mime_desktop_database_update |
335 |
|
336 |
echo |
337 |
elog "For information about installing a printer and general cups setup" |
338 |
elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml" |
339 |
echo |
340 |
elog "Network browsing for printers is now switched off by default in the config file." |
341 |
elog "To (re-)enable it, edit /etc/cupsd.conf and set \"Browsing On\", " |
342 |
elog "afterwards re-start or reload cups." |
343 |
echo |
344 |
} |
345 |
|
346 |
pkg_postrm() { |
347 |
# Update desktop file database and gtk icon cache (bug 370059) |
348 |
gnome2_icon_cache_update |
349 |
fdo-mime_desktop_database_update |
350 |
} |
351 |
|
352 |
|
353 |
|
354 |
1.1 net-print/cups/cups-1.5.2-r20.ebuild |
355 |
|
356 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.2-r20.ebuild?rev=1.1&view=markup |
357 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-print/cups/cups-1.5.2-r20.ebuild?rev=1.1&content-type=text/plain |
358 |
|
359 |
Index: cups-1.5.2-r20.ebuild |
360 |
=================================================================== |
361 |
# Copyright 1999-2012 Gentoo Foundation |
362 |
# Distributed under the terms of the GNU General Public License v2 |
363 |
# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.5.2-r20.ebuild,v 1.1 2012/04/26 21:51:03 dilfridge Exp $ |
364 |
|
365 |
EAPI=4 |
366 |
|
367 |
PYTHON_DEPEND="python? 2:2.5" |
368 |
|
369 |
inherit autotools eutils fdo-mime gnome2-utils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2 systemd |
370 |
|
371 |
MY_P=${P/_} |
372 |
MY_PV=${PV/_} |
373 |
|
374 |
DESCRIPTION="The Common Unix Printing System" |
375 |
HOMEPAGE="http://www.cups.org/" |
376 |
SRC_URI="mirror://easysw/${PN}/${MY_PV}/${MY_P}-source.tar.bz2 |
377 |
http://dev.gentoo.org/~dilfridge/distfiles/${P}-ipp-r8950.patch.bz2 |
378 |
http://dev.gentoo.org/~dilfridge/distfiles/${P}-avahi.patch.bz2 |
379 |
" |
380 |
|
381 |
LICENSE="GPL-2" |
382 |
SLOT="0" |
383 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86" |
384 |
IUSE="acl avahi dbus debug +filters gnutls java +jpeg kerberos ldap pam perl |
385 |
+png python slp +ssl static-libs systemd +threads +tiff usb X xinetd" |
386 |
|
387 |
LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW" |
388 |
for X in ${LANGS} ; do |
389 |
IUSE="${IUSE} linguas_${X}" |
390 |
done |
391 |
|
392 |
RDEPEND=" |
393 |
app-text/libpaper |
394 |
acl? ( |
395 |
kernel_linux? ( |
396 |
sys-apps/acl |
397 |
sys-apps/attr |
398 |
) |
399 |
) |
400 |
dbus? ( sys-apps/dbus ) |
401 |
java? ( >=virtual/jre-1.6 ) |
402 |
jpeg? ( virtual/jpeg:0 ) |
403 |
kerberos? ( virtual/krb5 ) |
404 |
ldap? ( net-nds/openldap[ssl?,gnutls?] ) |
405 |
pam? ( virtual/pam ) |
406 |
perl? ( dev-lang/perl ) |
407 |
png? ( >=media-libs/libpng-1.4.3:0 ) |
408 |
slp? ( >=net-libs/openslp-1.0.4 ) |
409 |
ssl? ( |
410 |
gnutls? ( |
411 |
dev-libs/libgcrypt |
412 |
net-libs/gnutls |
413 |
) |
414 |
!gnutls? ( >=dev-libs/openssl-0.9.8g ) |
415 |
) |
416 |
systemd? ( sys-apps/systemd ) |
417 |
tiff? ( >=media-libs/tiff-3.5.5:0 ) |
418 |
usb? ( virtual/libusb:0 ) |
419 |
X? ( x11-misc/xdg-utils ) |
420 |
xinetd? ( sys-apps/xinetd ) |
421 |
" |
422 |
|
423 |
DEPEND="${RDEPEND} |
424 |
dev-util/pkgconfig |
425 |
" |
426 |
|
427 |
PDEPEND=" |
428 |
app-text/ghostscript-gpl[cups] |
429 |
>=app-text/poppler-0.12.3-r3[utils] |
430 |
filters? ( net-print/foomatic-filters ) |
431 |
" |
432 |
|
433 |
REQUIRED_USE="gnutls? ( ssl )" |
434 |
|
435 |
# upstream includes an interactive test which is a nono for gentoo |
436 |
RESTRICT="test" |
437 |
|
438 |
S="${WORKDIR}/${MY_P}" |
439 |
|
440 |
pkg_setup() { |
441 |
enewgroup lp |
442 |
enewuser lp -1 -1 -1 lp |
443 |
enewgroup lpadmin 106 |
444 |
|
445 |
# python 3 is no-go |
446 |
if use python; then |
447 |
python_set_active_version 2 |
448 |
python_pkg_setup |
449 |
fi |
450 |
|
451 |
if use kernel_linux; then |
452 |
linux-info_pkg_setup |
453 |
if ! linux_config_exists; then |
454 |
ewarn "Can't check the linux kernel configuration." |
455 |
ewarn "You might have some incompatible options enabled." |
456 |
else |
457 |
# recheck that we don't have usblp to collide with libusb |
458 |
if use usb; then |
459 |
if linux_chkconfig_present USB_PRINTER; then |
460 |
eerror "Your usb printers will be managed via libusb. In this case, " |
461 |
eerror "${P} requires the USB_PRINTER support disabled." |
462 |
eerror "Please disable it:" |
463 |
eerror " CONFIG_USB_PRINTER=n" |
464 |
eerror "in /usr/src/linux/.config or" |
465 |
eerror " Device Drivers --->" |
466 |
eerror " USB support --->" |
467 |
eerror " [ ] USB Printer support" |
468 |
eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)." |
469 |
fi |
470 |
else |
471 |
#here we should warn user that he should enable it so he can print |
472 |
if ! linux_chkconfig_present USB_PRINTER; then |
473 |
ewarn "If you plan to use USB printers you should enable the USB_PRINTER" |
474 |
ewarn "support in your kernel." |
475 |
ewarn "Please enable it:" |
476 |
ewarn " CONFIG_USB_PRINTER=y" |
477 |
ewarn "in /usr/src/linux/.config or" |
478 |
ewarn " Device Drivers --->" |
479 |
ewarn " USB support --->" |
480 |
ewarn " [*] USB Printer support" |
481 |
ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." |
482 |
fi |
483 |
fi |
484 |
fi |
485 |
fi |
486 |
} |
487 |
|
488 |
src_prepare() { |
489 |
# various build time fixes |
490 |
epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch" |
491 |
epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch" |
492 |
epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
493 |
epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch" |
494 |
epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch" |
495 |
epatch "${FILESDIR}/${PN}-1.5.2-linkperl.patch" |
496 |
epatch "${FILESDIR}/${PN}-1.5.2-threads.patch" |
497 |
epatch "${FILESDIR}/${PN}-1.5.2-threads2.patch" |
498 |
|
499 |
# systemd support |
500 |
epatch "${FILESDIR}/${PN}-1.5.0-systemd-socket.patch" |
501 |
|
502 |
# revert ipp backend to 1.4 state, as ubuntu and debian |
503 |
epatch "${DISTDIR}/${PN}-1.5.2-ipp-r8950.patch.bz2" |
504 |
|
505 |
# avahi support from debian |
506 |
epatch "${DISTDIR}/${PN}-1.5.2-avahi.patch.bz2" |
507 |
|
508 |
# browsing off by default |
509 |
epatch "${FILESDIR}/${PN}-1.5.2-browsing.patch" |
510 |
|
511 |
AT_M4DIR=config-scripts eaclocal |
512 |
eautoconf |
513 |
} |
514 |
|
515 |
src_configure() { |
516 |
export DSOFLAGS="${LDFLAGS}" |
517 |
|
518 |
# locale support |
519 |
strip-linguas ${LANGS} |
520 |
if [ -z "${LINGUAS}" ] ; then |
521 |
export LINGUAS=none |
522 |
fi |
523 |
|
524 |
local myconf |
525 |
if use ssl ; then |
526 |
myconf+=" |
527 |
$(use_enable gnutls) |
528 |
$(use_enable !gnutls openssl) |
529 |
" |
530 |
else |
531 |
myconf+=" |
532 |
--disable-gnutls |
533 |
--disable-openssl |
534 |
" |
535 |
fi |
536 |
|
537 |
econf \ |
538 |
--libdir=/usr/$(get_libdir) \ |
539 |
--localstatedir=/var \ |
540 |
--with-cups-user=lp \ |
541 |
--with-cups-group=lp \ |
542 |
--with-docdir=/usr/share/cups/html \ |
543 |
--with-languages="${LINGUAS}" \ |
544 |
--with-pdftops=/usr/bin/pdftops \ |
545 |
--with-system-groups=lpadmin \ |
546 |
$(use_enable acl) \ |
547 |
$(use_enable avahi) \ |
548 |
$(use_enable dbus) \ |
549 |
$(use_enable debug) \ |
550 |
$(use_enable debug debug-guards) \ |
551 |
$(use_enable jpeg) \ |
552 |
$(use_enable kerberos gssapi) \ |
553 |
$(use_enable ldap) \ |
554 |
$(use_enable pam) \ |
555 |
$(use_enable png) \ |
556 |
$(use_enable slp) \ |
557 |
$(use_enable static-libs static) \ |
558 |
$(use_enable threads) \ |
559 |
$(use_enable tiff) \ |
560 |
$(use_enable usb libusb) \ |
561 |
$(use_with java) \ |
562 |
$(use_with perl) \ |
563 |
--without-php \ |
564 |
$(use_with python) \ |
565 |
$(use_with xinetd xinetd /etc/xinetd.d) \ |
566 |
--enable-libpaper \ |
567 |
--disable-dnssd \ |
568 |
$(use_with systemd systemdsystemunitdir "$(systemd_get_unitdir)") \ |
569 |
${myconf} |
570 |
|
571 |
# install in /usr/libexec always, instead of using /usr/lib/cups, as that |
572 |
# makes more sense when facing multilib support. |
573 |
sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die |
574 |
sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die |
575 |
sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die |
576 |
} |
577 |
|
578 |
src_compile() { |
579 |
emake |
580 |
|
581 |
if use perl ; then |
582 |
cd "${S}"/scripting/perl |
583 |
perl-module_src_prep |
584 |
perl-module_src_compile |
585 |
fi |
586 |
} |
587 |
|
588 |
src_install() { |
589 |
emake BUILDROOT="${D}" install |
590 |
dodoc {CHANGES,CREDITS,README}.txt |
591 |
|
592 |
if use perl ; then |
593 |
pushd scripting/perl > /dev/null |
594 |
perl-module_src_install |
595 |
fixlocalpod |
596 |
popd > /dev/null |
597 |
fi |
598 |
|
599 |
# clean out cups init scripts |
600 |
rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
601 |
|
602 |
# install our init script |
603 |
local neededservices |
604 |
use dbus && neededservices+=" dbus" |
605 |
[[ -n ${neededservices} ]] && neededservices="need${neededservices}" |
606 |
cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die |
607 |
sed -i \ |
608 |
-e "s/@neededservices@/$neededservices/" \ |
609 |
"${T}"/cupsd || die |
610 |
doinitd "${T}"/cupsd |
611 |
|
612 |
# install our pam script |
613 |
pamd_mimic_system cups auth account |
614 |
|
615 |
if use xinetd ; then |
616 |
# correct path |
617 |
sed -i \ |
618 |
-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
619 |
"${ED}"/etc/xinetd.d/cups-lpd || die |
620 |
# it is safer to disable this by default, bug #137130 |
621 |
grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
622 |
{ sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
623 |
# write permission for file owner (root), bug #296221 |
624 |
fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
625 |
else |
626 |
rm -rf "${ED}"/etc/xinetd.d |
627 |
fi |
628 |
|
629 |
keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
630 |
/var/cache/cups /var/cache/cups/rss /var/log/cups \ |
631 |
/var/spool/cups/tmp |
632 |
|
633 |
keepdir /etc/cups/{interfaces,ppd,ssl} |
634 |
|
635 |
use X || rm -r "${ED}"/usr/share/applications |
636 |
|
637 |
# create /etc/cups/client.conf, bug #196967 and #266678 |
638 |
echo "ServerName /var/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
639 |
} |
640 |
|
641 |
pkg_preinst() { |
642 |
gnome2_icon_savelist |
643 |
} |
644 |
|
645 |
pkg_postinst() { |
646 |
# Update desktop file database and gtk icon cache (bug 370059) |
647 |
gnome2_icon_cache_update |
648 |
fdo-mime_desktop_database_update |
649 |
|
650 |
echo |
651 |
elog "For information about installing a printer and general cups setup" |
652 |
elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml" |
653 |
echo |
654 |
elog "Network browsing for printers is now switched off by default in the config file." |
655 |
elog "To (re-)enable it, edit /etc/cupsd.conf and set \"Browsing On\", " |
656 |
elog "afterwards re-start or reload cups." |
657 |
echo |
658 |
} |
659 |
|
660 |
pkg_postrm() { |
661 |
# Update desktop file database and gtk icon cache (bug 370059) |
662 |
gnome2_icon_cache_update |
663 |
fdo-mime_desktop_database_update |
664 |
} |