Magellan Linux

Contents of /smage/trunk/core/lprng/lprng-3.8.C-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5353 - (show annotations) (download)
Fri Jan 3 11:36:34 2014 UTC (10 years, 5 months ago) by niro
File size: 2226 byte(s)
-removed deprecated configure opts
1 # $Id$
2
3 PNAME="lprng"
4 PVER="3.8.C"
5 PBUILD="r1"
6
7 PCAT="net-print"
8
9 DESCRIPTION="LPRng is an enhanced implementation of the Berkeley LPR print spooler."
10 HOMEPAGE="http://www.lprng.com/"
11
12 DEPEND=">= virtual/glibc"
13
14 SRCFILE="${PNAME}-${PVER}.tar.gz"
15 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
16
17 ALX_PKG_KEEP="etc
18 usr/bin
19 usr/sbin
20 usr/lib/systemd
21 usr/$(mlibdir)/filters
22 usr/$(mlibdir)/*.so.*"
23 sminclude mtools systemd alx-split
24
25 # lprng.rc cvs revision
26 CVS_REV=1.3
27
28 SRC_URI=(
29 sourceforge://${PNAME}/${SRCFILE}
30 mirror://${PNAME}/${SRCFILE}
31 mirror://${PNAME}/lpd.service
32 mirror://${PNAME}/printcap
33 )
34
35 UP2DATE="updatecmd_sourceforge ${PNAME} gz"
36
37 src_prepare()
38 {
39 # warn about /proc in chroot environments
40 [[ ! -d /proc/sys ]] && die "Please make sure /proc is mounted in chroot-environments."
41
42 munpack ${SRCFILE} || die
43 }
44
45 src_compile()
46 {
47 cd ${SRCDIR}
48
49 mconfigure \
50 --libexecdir=/usr/$(mlibdir)/lprng \
51 --sysconfdir=/etc/lprng \
52 --with-lpd_conf_path=/etc/lprng/lpd.conf \
53 --with-lpd_perms_path=/etc/lprng/lpd.perms \
54 --with-userid=lp \
55 --with-groupid=lp \
56 --enable-shared \
57 --disable-kerberos \
58 --disable-ssl \
59 || die
60
61 mmake -j1 || die
62 }
63
64 alx_generic_src_install()
65 {
66 cd ${SRCDIR}
67 mmake DESTDIR=${BINDIR} POSTINSTALL=NO \
68 gnulocaledir=${BINDIR}/usr/share/locale install || die
69
70 # systemd unit
71 minstallunit lpd.service || die
72
73 # ship some config files
74 minstallfile src/lpd.conf /etc/lprng || die
75 minstallfile conf/lpd.perms /etc/lprng || die
76 minstallfile -s printcap /etc/lprng || die
77 mlink lprng/printcap /etc/printcap || die
78
79 # install spooling directories with the right permissions
80 minstalldir /var/spool/lpd || die
81 minstalldir /var/spool/lpd/lp || die
82 mchown lp:lp /var/spool/lpd/lp || die
83 mchmod 0700 /var/spool/lpd/lp || die
84
85 # install missing docs
86 minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die
87 }
88
89 preinstall()
90 {
91 mgroupadd -o "-g 9" lp
92 # add in dailout group to gain access to /dev/ttyS0/S1 for com port printing
93 museradd -o "-u 9 -g lp -G dialout -d /var/spool/lpd -s /bin/false" lp
94
95 add_conf_prot_mask /etc/lprng
96 add_conf_prot_ignore /etc/lprng/printcap
97 }
98
99 postinstall()
100 {
101 mstartunit lpd.service
102 }
103
104 postremove()
105 {
106 mstopunit lpd.service
107 }