1 | %define nokerberos False |
---|
2 | %define _initdir /etc/rc.d/init.d |
---|
3 | %define use_alternatives 1 |
---|
4 | |
---|
5 | Summary: LPRng Print Spooler |
---|
6 | Summary(ja): LPRng プリントスプーラ |
---|
7 | Name: LPRng |
---|
8 | Version: 3.8.21 |
---|
9 | Release: 1%{?_dist_release} |
---|
10 | License: GPL and Artistic |
---|
11 | Group: System Environment/Daemons |
---|
12 | Source0: ftp://ftp.astart.com/pub/LPRng/LPRng/%{name}-%{version}.tgz |
---|
13 | Source1: lpd.init |
---|
14 | Patch0: LPRng-3.8.4-nonblock.patch |
---|
15 | Patch1: LPRng-3.7.4-lpd-perms.patch |
---|
16 | Patch2: LPRng-3.8.15-krb5.patch |
---|
17 | |
---|
18 | Patch3: LPRng-3.8.21-config.sub.patch |
---|
19 | Patch4: LPRng-3.8.21-lpq.patch |
---|
20 | Patch5: LPRng-3.8.21-lpf.patch |
---|
21 | |
---|
22 | # Vine Patch |
---|
23 | Patch101: LPRng-3.7.4-negative-check.patch |
---|
24 | |
---|
25 | URL: http://www.astart.com/LPRng.html |
---|
26 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
27 | Obsoletes: lpr |
---|
28 | Provides: lpr |
---|
29 | #Prereq: /sbin/chkconfig, %{_initdir}, mktemp, fileutils, textutils, gawk |
---|
30 | Prereq: /sbin/chkconfig, mktemp, fileutils, textutils, gawk |
---|
31 | BuildPreReq: gettext |
---|
32 | %{!?nokerberos:BuildPrereq: krb5-devel} |
---|
33 | %{!?nokerberos:Requires: krb5-libs} |
---|
34 | |
---|
35 | %if %use_alternatives |
---|
36 | Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat |
---|
37 | Prereq: alternatives |
---|
38 | %endif |
---|
39 | |
---|
40 | Vendor: Project Vine |
---|
41 | Distribution: Vine Linux |
---|
42 | Packager: Daisuke SUZUKI <daisuke@linux.or.jp> |
---|
43 | |
---|
44 | %description |
---|
45 | The LPRng software is an enhanced, extended, and portable implementation |
---|
46 | of the Berkeley LPR print spooler functionality. While providing the |
---|
47 | same interface and meeting RFC1179 requirements, the implementation |
---|
48 | is completely new and provides support for the following features: |
---|
49 | lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic |
---|
50 | redirection of print queues; automatic job holding; highly verbose |
---|
51 | diagnostics; multiple printers serving a single queue; client programs |
---|
52 | do not need to run SUID root; greatly enhanced security checks; and a |
---|
53 | greatly improved permission and authorization mechanism. |
---|
54 | |
---|
55 | The source software compiles and runs on a wide variety of UNIX systems, |
---|
56 | and is compatible with other print spoolers and network printers that |
---|
57 | use the LPR interface and meet RFC1179 requirements. LPRng provides |
---|
58 | emulation packages for the SVR4 lp and lpstat programs, eliminating the |
---|
59 | need for another print spooler package. These emulation packages can be |
---|
60 | modified according to local requirements, in order to support vintage |
---|
61 | printing systems. |
---|
62 | |
---|
63 | For users that require secure and/or authenticated printing support, |
---|
64 | LPRng supports Kerberos V, MIT Kerberos IV Print Support, and PGP |
---|
65 | authentication. LPRng is being adopted by MIT for use as their Campus |
---|
66 | Wide printing support system. Additional authentication support is |
---|
67 | extremely simple to add. |
---|
68 | |
---|
69 | |
---|
70 | %prep |
---|
71 | %setup -q |
---|
72 | %patch0 -p1 -b .nonblock |
---|
73 | %patch1 -p1 -b .lpd-perms |
---|
74 | %{!?nokerberos:%patch2 -p1 -b .kerb5} |
---|
75 | |
---|
76 | %patch3 -p1 -b .config.sub |
---|
77 | %patch4 -p1 -b .lpq |
---|
78 | %patch5 -p1 -b .lpf |
---|
79 | |
---|
80 | %patch101 -p1 -b .negative |
---|
81 | |
---|
82 | # pick up configure.in changes |
---|
83 | autoconf |
---|
84 | |
---|
85 | ## set up gettext |
---|
86 | #cd po |
---|
87 | #rm Makefile.in.in |
---|
88 | #ln -s /usr/share/gettext/po/Makefile.in.in . |
---|
89 | #cd .. |
---|
90 | ##rm -fr intl |
---|
91 | |
---|
92 | |
---|
93 | %build |
---|
94 | CFLAGS="-O2" ; export CFLAGS |
---|
95 | %configure \ |
---|
96 | --enable-nls \ |
---|
97 | --with-userid=lp \ |
---|
98 | --with-groupid=lp \ |
---|
99 | %{!?nokerberos:--enable-kerberos} |
---|
100 | make MAKEPACKAGE=YES |
---|
101 | |
---|
102 | |
---|
103 | |
---|
104 | %install |
---|
105 | rm -rf %{buildroot} |
---|
106 | |
---|
107 | # Installation of locales is broken... Work around it! |
---|
108 | perl -pi -e "s,prefix =.*,prefix = %{buildroot}%{_prefix},g" po/Makefile |
---|
109 | perl -pi -e "s,datadir =.*,datadir = %{buildroot}%{_prefix}/share,g" po/Makefile |
---|
110 | perl -pi -e "s,localedir =.*,localedir = %{buildroot}%{_prefix}/share/locale,g" po/Makefile |
---|
111 | perl -pi -e "s,gettextsrcdir =.*,gettextsrcdir = %{buildroot}%{_prefix}/share/gettext/po,g" po/Makefile |
---|
112 | |
---|
113 | make SUID_ROOT_PERMS=" 04755" DESTDIR=%{buildroot} MAKEPACKAGE=YES mandir=%{_mandir} install |
---|
114 | %__cp src/monitor %{buildroot}%{_prefix}/sbin/monitor |
---|
115 | |
---|
116 | |
---|
117 | # install init script |
---|
118 | mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d |
---|
119 | install -m755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/lpd |
---|
120 | |
---|
121 | %if %use_alternatives |
---|
122 | cd %{buildroot}%{_bindir} |
---|
123 | for i in cancel lp lpq lpr lprm lpstat; do |
---|
124 | mv $i $i.lprng |
---|
125 | done |
---|
126 | cd %{buildroot}%{_sbindir} |
---|
127 | mv lpc lpc.lprng |
---|
128 | cd %{buildroot}%{_mandir}/man1 |
---|
129 | for i in cancel lp lpq lpr lprm lpstat; do |
---|
130 | mv $i.1 $i-lprng.1 |
---|
131 | done |
---|
132 | |
---|
133 | cd %{buildroot}%{_mandir}/man8 |
---|
134 | mv lpc.8 lpc-lprng.8 |
---|
135 | %endif |
---|
136 | |
---|
137 | mv %{buildroot}%{_sysconfdir}/printcap %{buildroot}%{_sysconfdir}/printcap.sample |
---|
138 | |
---|
139 | %clean |
---|
140 | rm -rf %{buildroot} |
---|
141 | |
---|
142 | |
---|
143 | %post |
---|
144 | /sbin/chkconfig --add lpd |
---|
145 | if [ -w /etc/printcap ] ; then |
---|
146 | TMP1=`mktemp /etc/printcap.XXXXXX` |
---|
147 | gawk ' |
---|
148 | BEGIN { first = 1; cont = 0; last = "" } |
---|
149 | /^[:space:]*#/ { if(cont) sub("\\\\$", "", last)} |
---|
150 | { if(first == 0) print last } |
---|
151 | { first = 0 } |
---|
152 | { last = $0 } |
---|
153 | { cont = 0 } |
---|
154 | /\\$/ { cont = 1 } |
---|
155 | END {sub("\\\\$", "", last); print last} |
---|
156 | ' /etc/printcap > ${TMP1} && cat ${TMP1} > /etc/printcap && rm -f ${TMP1} |
---|
157 | fi |
---|
158 | |
---|
159 | %if %use_alternatives |
---|
160 | /sbin/update-alternatives --install %{_bindir}/lpr print %{_bindir}/lpr.lprng 40 \ |
---|
161 | --slave %{_bindir}/lp print-lp %{_bindir}/lp.lprng \ |
---|
162 | --slave %{_bindir}/lpq print-lpq %{_bindir}/lpq.lprng \ |
---|
163 | --slave %{_bindir}/lprm print-lprm %{_bindir}/lprm.lprng \ |
---|
164 | --slave %{_bindir}/lpstat print-lpstat %{_bindir}/lpstat.lprng \ |
---|
165 | --slave %{_bindir}/cancel print-cancel %{_bindir}/cancel.lprng \ |
---|
166 | --slave %{_sbindir}/lpc print-lpc %{_sbindir}/lpc.lprng \ |
---|
167 | --slave %{_mandir}/man1/cancel.1.gz print-cancelman %{_mandir}/man1/cancel-lprng.1.gz \ |
---|
168 | --slave %{_mandir}/man1/lp.1.gz print-lpman %{_mandir}/man1/lp-lprng.1.gz \ |
---|
169 | --slave %{_mandir}/man8/lpc.8.gz print-lpcman %{_mandir}/man8/lpc-lprng.8.gz \ |
---|
170 | --slave %{_mandir}/man1/lpq.1.gz print-lpqman %{_mandir}/man1/lpq-lprng.1.gz \ |
---|
171 | --slave %{_mandir}/man1/lpr.1.gz print-lprman %{_mandir}/man1/lpr-lprng.1.gz \ |
---|
172 | --slave %{_mandir}/man1/lprm.1.gz print-lprmman %{_mandir}/man1/lprm-lprng.1.gz \ |
---|
173 | --slave %{_mandir}/man1/lpstat.1.gz print-lpstatman %{_mandir}/man1/lpstat-lprng.1.gz |
---|
174 | %endif |
---|
175 | |
---|
176 | %preun |
---|
177 | if [ "$1" = 0 ]; then |
---|
178 | %{_initdir}/lpd stop >/dev/null 2>&1 |
---|
179 | /sbin/chkconfig --del lpd |
---|
180 | |
---|
181 | %if %use_alternatives |
---|
182 | /sbin/update-alternatives --remove print %{_bindir}/lpr.lprng |
---|
183 | %endif |
---|
184 | fi |
---|
185 | |
---|
186 | |
---|
187 | %postun |
---|
188 | if [ "$1" -ge "1" ]; then |
---|
189 | %{_initdir}/lpd condrestart >/dev/null 2>&1 |
---|
190 | fi |
---|
191 | |
---|
192 | |
---|
193 | %triggerpostun -- lpr |
---|
194 | /sbin/chkconfig --add lpd |
---|
195 | |
---|
196 | |
---|
197 | %files |
---|
198 | %defattr(-,root,root) |
---|
199 | %attr(644,root,root) %config(noreplace) %{_sysconfdir}/lpd.conf |
---|
200 | %attr(644,root,root) %config(noreplace) %{_sysconfdir}/lpd.perms |
---|
201 | %config %{_sysconfdir}/rc.d/init.d/lpd |
---|
202 | %{_sysconfdir}/printcap.sample |
---|
203 | %{_sysconfdir}/lpd.conf.sample |
---|
204 | %{_sysconfdir}/lpd.perms.sample |
---|
205 | %ifarch x86_64 |
---|
206 | %{_libdir} |
---|
207 | %else |
---|
208 | %{_libdir}/*.so.* |
---|
209 | %endif |
---|
210 | %attr(755,lp,lp) %{_bindir}/lpq.lprng |
---|
211 | %attr(755,lp,lp) %{_bindir}/lprm.lprng |
---|
212 | %attr(755,lp,lp) %{_bindir}/lpr.lprng |
---|
213 | %attr(755,lp,lp) %{_bindir}/lpstat.lprng |
---|
214 | %{_bindir}/lp.lprng |
---|
215 | %{_bindir}/cancel.lprng |
---|
216 | %attr(755,lp,lp) %{_sbindir}/lpc.lprng |
---|
217 | %attr(755,root,root) %{_sbindir}/lpd |
---|
218 | %attr(755,root,root) %{_sbindir}/checkpc |
---|
219 | %attr(755,root,root) %{_sbindir}/monitor |
---|
220 | %attr(755,root,root) /usr/libexec/filters/* |
---|
221 | %{_mandir}/*/* |
---|
222 | %doc CHANGES CONTRIBUTORS COPYRIGHT INSTALL LICENSE |
---|
223 | %doc README* VERSION Y2KCompliance |
---|
224 | %doc HOWTO/*.html HOWTO/*.jpg |
---|
225 | |
---|
226 | |
---|
227 | %changelog |
---|
228 | * Sun Sep 14 2008 Shu KONNO <owa@bg.wakwak.com> 3.8.21-1vl5 |
---|
229 | - applied new versioning policy, spec in utf-8 |
---|
230 | |
---|
231 | * Mon Nov 26 2007 Shu KONNO <owa@bg.wakwak.com> 3.8.21-0vl3 |
---|
232 | - changed source url to ftp://ftp.lprng.com/pub/LPRng/LPRng/LPRng-%%{version}.tgz |
---|
233 | - added Patch3: LPRng-3.8.21-config.sub.patch (for x86_64) |
---|
234 | - added Patch4: LPRng-3.8.21-lpq.patch |
---|
235 | - added Patch5: LPRng-3.8.21-lpf.patch |
---|
236 | - added %{_sysconfdir}/{printcap,lpd.conf,lpd.perms}.sample in %%files section |
---|
237 | |
---|
238 | * Fri Oct 31 2003 Tomoya TAKA <taka@vinelinux.org> 3.8.21-0vl2 |
---|
239 | - remove workaround for gettext in %%prep |
---|
240 | |
---|
241 | * Mon Sep 1 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 3.8.21-0vl1.1 |
---|
242 | - use alternatives. |
---|
243 | |
---|
244 | * Wed Jun 4 2003 Jun Nishii <jun@vinelinux.org> 3.8.21-0vl1 |
---|
245 | - ver.up |
---|
246 | |
---|
247 | * Wed Jan 29 2003 Tomoya TAKA <taka@vinelinux.org> 3.8.20-0vl1 |
---|
248 | - drop LPRng-3.7.4-alpha-direct.patch |
---|
249 | - drop HOWTO/*.gif and add HOWTO/*.jpg from/to %%doc |
---|
250 | |
---|
251 | * Mon Jan 23 2003 Satoshi MACHINO <machino@vinelinux.org> 3.8.20-0vl1 |
---|
252 | - updated to 3.8.20 |
---|
253 | -- dropped LPRng-3.7.4-lockfile.patch |
---|
254 | -- dropped LPRng-3.7.4-nointl.patch |
---|
255 | -- dropped LPRng-3.7.4-inet_ntop.patch |
---|
256 | -- added /usr/lib/liblpr.so |
---|
257 | - imported some patches from LPRng-3.8.19-1 |
---|
258 | -- added LPRng-3.8.4-nonblock.patch |
---|
259 | -- added LPRng-3.7.4-lpd-perms.patch |
---|
260 | -- added LPRng-3.8.15-krb5.patch |
---|
261 | |
---|
262 | * Fri Jul 13 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 3.7.4-6vl5 |
---|
263 | - change CFLAGS in %make from -ggdb to -O2 |
---|
264 | |
---|
265 | * Thu Feb 15 2001 Tomoya TAKA <tomoya@olive.plala.or.jp> |
---|
266 | - 3.7.4-6vl4 |
---|
267 | - change type of Direct_DYN on alpha (int -> int64_t) |
---|
268 | |
---|
269 | * Wed Feb 14 2001 Jun Nishii <jun@vinelinux.org> |
---|
270 | - 3.7.4-6vl3 |
---|
271 | - negative solution to avoid changing permision of the filter under spool directory. |
---|
272 | |
---|
273 | * Thu Feb 8 2001 Jun Nishii <jun@vinelinux.org> |
---|
274 | - 3.7.4-6vl2 |
---|
275 | - fix lpd.init |
---|
276 | |
---|
277 | * Tue Feb 6 2001 Jun Nishii <jun@vinelinux.org> |
---|
278 | - 3.7.4-6vl1 |
---|
279 | |
---|
280 | * Sat Feb 03 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org> |
---|
281 | - 3.6.26-1vl2 |
---|
282 | - remove /etc/rc.d/init.d from Prereq: for better compatibility with apt |
---|
283 | - added Japanese summary |
---|
284 | - use better macro(s) (%%{_initdir}) |
---|
285 | |
---|
286 | * Tue Dec 19 2000 Jun Nishii <jun@vinelinux.org> |
---|
287 | - 3.6.26-1vl1 |
---|
288 | |
---|
289 | * Sat Oct 21 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
290 | - 3.2.26; fixes some security problems (Bug #19518) |
---|
291 | |
---|
292 | * Mon Sep 11 2000 Crutcher Dunnavant <crutcher@redhat.com> |
---|
293 | - Added gettext to the BuildPreReq list |
---|
294 | |
---|
295 | * Mon Sep 11 2000 Crutcher Dunnavant <crutcher@redhat.com> |
---|
296 | - Fixed lpd.init to use /etc/rc.d/init.d/, instead of /etc/init.d |
---|
297 | |
---|
298 | * Mon Sep 11 2000 Crutcher Dunnavant <crutcher@redhat.com> |
---|
299 | - changed the prereq: /etc/init.d to: /etc/rc.d/init.d |
---|
300 | - we are not changing that over (yet?) |
---|
301 | |
---|
302 | * Mon Aug 14 2000 Crutcher Dunnavant <crutcher@redhat.com> |
---|
303 | - removed the sticky bit from lpc |
---|
304 | |
---|
305 | * Mon Aug 14 2000 Crutcher Dunnavant <crutcher@redhat.com> |
---|
306 | - removed the sticky bit from the client programs (LPRng doesn't need them) |
---|
307 | |
---|
308 | * Sat Aug 05 2000 Bill Nottingham <notting@redhat.com> |
---|
309 | - condrestart fixes |
---|
310 | |
---|
311 | * Fri Aug 4 2000 Bill Nottingham <notting@redhat.com> |
---|
312 | - triggerpostun on lpr |
---|
313 | |
---|
314 | * Sun Jul 30 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
315 | - 3.6.22 (some fixes) |
---|
316 | |
---|
317 | * Tue Jul 25 2000 Bill Nottingham <notting@redhat.com> |
---|
318 | - fix prereq |
---|
319 | |
---|
320 | * Sat Jul 22 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
321 | - fix bogus checkpc error messages when the lockfile doesn't exist because |
---|
322 | init scripts clear /var/run (#14472) |
---|
323 | |
---|
324 | * Tue Jul 18 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
325 | - fix chkconfig comments in the init script |
---|
326 | |
---|
327 | * Mon Jul 17 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
328 | - move the init script to /etc/rc.d/init.d |
---|
329 | - fix perms on setuid binaries |
---|
330 | |
---|
331 | * Fri Jul 14 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
332 | - patch checkpc to not complain when filter is executable and in the |
---|
333 | spool directory |
---|
334 | - remove --disable-force_localhost from configure invocation for better |
---|
335 | compatibility with BSD LPR and rhs-printfilters |
---|
336 | - change group back to lp, which is what printtool expects |
---|
337 | |
---|
338 | * Thu Jul 13 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
339 | - change default group to 'daemon' to match 6.2 |
---|
340 | - enable NLS support |
---|
341 | - remove Prefix: tag |
---|
342 | - break init script out into a separate file |
---|
343 | - fix up broken printcaps in post-install |
---|
344 | - run checkpc -f at start-time |
---|
345 | |
---|
346 | * Wed Jul 12 2000 Prospector <bugzilla@redhat.com> |
---|
347 | - automatic rebuild |
---|
348 | |
---|
349 | * Tue Jul 11 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
350 | - 3.6.21 |
---|
351 | - get rid of the notypedef patch - gcc has been fixed at last. |
---|
352 | |
---|
353 | * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com> |
---|
354 | - sample config files removed from /etc. |
---|
355 | - initscript moved to /etc/init.d |
---|
356 | |
---|
357 | * Wed Jun 21 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
358 | - 3.6.18 |
---|
359 | |
---|
360 | * Sat Jun 17 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
361 | - 3.6.16 |
---|
362 | - adapt Kerberos and fixmake patches |
---|
363 | - get rid of CFLAGS="-O"; gcc has been fixed |
---|
364 | - fix build with glibc 2.2 |
---|
365 | |
---|
366 | * Mon Jun 05 2000 Preston Brown <pbrown@redhat.com> |
---|
367 | - ifdef 0 is illegal, changed to if 0. |
---|
368 | - work around compiler typdef bug. |
---|
369 | |
---|
370 | * Thu Jun 01 2000 Preston Brown <pbrown@redhat.com> |
---|
371 | - start, stop, and restart are functions not switch statements now. |
---|
372 | reduces overhead. |
---|
373 | - patch to allow autoconf to choose which user/group to run as |
---|
374 | |
---|
375 | * Wed May 31 2000 Preston Brown <pbrown@redhat.com> |
---|
376 | - remove init.d symbolic links. |
---|
377 | - remove txt/ps/info versions of the HOWTO from the pkg |
---|
378 | - use new fhs paths |
---|
379 | |
---|
380 | * Thu May 25 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
381 | - change free() to krb5_free_data_contents() when patching for Kerberos 5 |
---|
382 | - detect libcrypto or libk5crypto when looking for Kerberos 5 |
---|
383 | |
---|
384 | * Tue May 16 2000 Nalin Dahyabhai <nalin@redhat.com> |
---|
385 | - enable Kerberos support |
---|
386 | - remove extra defattr in files list |
---|
387 | - add --disable-force_localhost to configure invocation |
---|
388 | - remove "-o root" at install-time |
---|
389 | |
---|
390 | * Tue May 16 2000 Matt Wilson <msw@redhat.com> |
---|
391 | - add Prereq of /sbin/chkconfig |
---|
392 | - fix broken conflicting declaration on alpha |
---|
393 | |
---|
394 | * Tue Apr 18 2000 Bernhard Rosenkraenzer <bero@redhat.com> |
---|
395 | - initial Red Hat packaging, fix up the spec file |
---|
396 | |
---|
397 | * Mon Sep 13 1999 Patrick Powell <papowell@astart.com> |
---|
398 | - resolved problems with symbolic links to /etc/init.d |
---|
399 | files - used the chkconfig facility |
---|
400 | |
---|
401 | * Sat Sep 4 1999 Patrick Powell <papowell@astart.com> |
---|
402 | - did ugly things to put the script in the spec file |
---|
403 | |
---|
404 | * Sat Aug 28 1999 Giulio Orsero <giulioo@tiscalinet.it> |
---|
405 | - 3.6.8 |
---|
406 | |
---|
407 | * Fri Aug 27 1999 Giulio Orsero <giulioo@tiscalinet.it> |
---|
408 | - 3.6.7 First RPM build. |
---|