/[gentoo-alt]/trunk/net-print/cups/cups-1.1.23-r3.ebuild
Gentoo

Contents of /trunk/net-print/cups/cups-1.1.23-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 418 - (show annotations) (download)
Sat May 28 10:55:45 2005 UTC (9 years, 4 months ago) by flameeyes
File size: 4372 byte(s)
Added cups with fixes on bug #93960.

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit eutils flag-o-matic pam
6
7 MY_P=${P/_/}
8
9 DESCRIPTION="The Common Unix Printing System"
10 HOMEPAGE="http://www.cups.org/"
11 SRC_URI="ftp://ftp2.easysw.com/pub/cups/test/${MY_P}-source.tar.bz2
12 ftp://ftp.easysw.com/pub/cups/test/${MY_P}-source.tar.bz2
13 ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/cups/test/${MY_P}-source.tar.bz2
14 http://www.srz.de/Members/bla/cups/filter/pdftops/pdftops.pl"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
19 IUSE="ssl slp pam samba nls cjk gnutls"
20
21 DEP="pam? ( virtual/pam )
22 ssl? (
23 !gnutls? ( >=dev-libs/openssl-0.9.6b )
24 gnutls? ( net-libs/gnutls )
25 )
26 slp? ( >=net-libs/openslp-1.0.4 )
27 nls? ( sys-devel/gettext )
28 >=media-libs/libpng-1.2.1
29 >=media-libs/tiff-3.5.5
30 >=media-libs/jpeg-6b"
31 DEPEND="${DEP}
32 >=sys-devel/autoconf-2.58"
33 RDEPEND="${DEP}
34 !virtual/lpr
35 app-text/xpdf"
36 PDEPEND="samba? ( >=net-fs/samba-3.0.8 )"
37 PROVIDE="virtual/lpr"
38
39 S=${WORKDIR}/${MY_P}
40
41 pkg_setup() {
42 enewgroup lp
43 enewuser lp -1 -1 -1 lp
44 }
45
46 src_unpack() {
47 unpack ${A}
48 cd ${S}
49 epatch ${FILESDIR}/disable-strip.patch
50 epatch ${FILESDIR}/cups-gcc4-amd64.patch #79791
51 epatch ${FILESDIR}/cups-gentooalt.patch
52 epatch ${FILESDIR}/cups-lppasswd-setXid.patch
53 WANT_AUTOCONF=2.5 autoconf || die
54
55 # disable builtin xpdf
56 sed -i -e "s:pdftops::" Makefile
57 }
58
59 src_compile() {
60
61 local myconf
62 use amd64 && replace-flags -Os -O2
63
64 use ssl && \
65 myconf="${myconf} $(use_enable gnutls) $(use_enable !gnutls openssl)"
66
67 CUPS_REQUESTS="/var/spool/cups" \
68 econf \
69 --with-cups-user=lp \
70 --with-cups-group=lp \
71 $(use_enable pam) \
72 $(use_enable ssl) \
73 $(use_enable slp) \
74 $(use_enable nls) \
75 --with-logdir=/var/log/cups \
76 ${myconf} \
77 || die "econf failed"
78
79 emake || die "compile problem"
80 }
81
82 src_install() {
83 dodir /var/spool /var/log/cups /etc/cups
84
85 make \
86 LOCALEDIR=${D}/usr/share/locale \
87 DOCDIR=${D}/usr/share/cups/docs \
88 REQUESTS=${D}/var/spool/cups \
89 SERVERBIN=${D}/usr/$(get_libdir)/cups \
90 DATADIR=${D}/usr/share/cups \
91 INCLUDEDIR=${D}/usr/include \
92 AMANDIR=${D}/usr/share/man \
93 PMANDIR=${D}/usr/share/man \
94 MANDIR=${D}/usr/share/man \
95 SERVERROOT=${D}/etc/cups \
96 LOGDIR=${D}/var/log/cups \
97 SBINDIR=${D}/usr/sbin \
98 PAMDIR=${D}/etc/pam.d \
99 EXEC_PREFIX=${D}/usr \
100 LIBDIR=${D}/usr/$(get_libdir) \
101 BINDIR=${D}/usr/bin \
102 bindir=${D}/usr/bin \
103 INITDIR=${D}/etc \
104 PREFIX=${D} \
105 install || die "install problem"
106
107 dodoc {CHANGES,CREDITS,ENCRYPTION,LICENSE,README}.txt
108 dosym /usr/share/cups/docs /usr/share/doc/${PF}/html
109
110 # cleanups
111 rm -rf ${D}/etc/init.d ${D}/etc/pam.d ${D}/etc/rc* ${D}/usr/share/man/cat* \
112 ${D}/etc/cups/{certs,interfaces,ppd} ${D}/var
113
114 sed -i -e "s:^#\(DocumentRoot\).*:\1 /usr/share/cups/docs:" \
115 -e "s:^#\(SystemGroup\).*:\1 lp:" \
116 -e "s:^#\(User\).*:\1 lp:" \
117 -e "s:^#\(Group\).*:\1 lp:" \
118 ${D}/etc/cups/cupsd.conf
119
120 pamd_mimic_system cups auth account
121
122 newinitd ${FILESDIR}/cupsd.rc6 cupsd
123 insinto /etc/xinetd.d ; newins ${FILESDIR}/cups.xinetd cups-lpd
124
125 # allow raw printing
126 dosed "s:#application/octet-stream:application/octet-stream:" /etc/cups/mime.types /etc/cups/mime.convs
127
128 # Let foreign charset PDF's print. (Bug: 67493)
129 dosym /etc/xpdfrc /etc/cups/pdftops.conf
130
131 # install pdftops filter
132 exeinto /usr/lib/cups/filter/
133 newexe ${DISTDIR}/pdftops.pl pdftops
134 dosed "s:/usr/local:/usr:" /usr/lib/cups/filter/pdftops
135 }
136
137 pkg_postinst() {
138 install -d -m0755 ${ROOT}/var/log/cups
139 install -d -m0755 ${ROOT}/var/spool
140 install -m0700 -o lp -d ${ROOT}/var/spool/cups
141 install -m1700 -o lp -d ${ROOT}/var/spool/cups/tmp
142 install -m0711 -o lp -d ${ROOT}/etc/cups/certs
143 install -d -m0755 ${ROOT}/etc/cups/{interfaces,ppd}
144
145 einfo "If you're using a USB printer, \"emerge coldplug; rc-update add"
146 einfo "coldplug boot\" is something you should probably do. This"
147 einfo "will allow any USB kernel modules (if present) to be loaded"
148 einfo "automatically at boot."
149 einfo
150 einfo "For more information about installing a printer take a look at:"
151 einfo "http://www.gentoo.org/doc/en/printing-howto.xml."
152
153 if useq cjk ; then
154 einfo
155 einfo "If you want CJK support on PDF's you'll need to re-emerge"
156 einfo "app-text/xpdf with your LINGUAS variable set instead of"
157 einfo "the CJK flag. (Bug: 67493)"
158 fi
159 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20