Magellan Linux

Contents of /smage/trunk/core/lprng/lprng-3.8.B-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4384 - (show annotations) (download)
Fri Nov 16 14:45:50 2012 UTC (11 years, 7 months ago) by niro
File size: 2302 byte(s)
-added systemd unit
1 # $Id$
2
3 PNAME="lprng"
4 PVER="3.8.B"
5 PBUILD="r5"
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="LPRng-${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 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} LPRng"
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 --disable-setuid \
60 --disable-strip \
61 --disable-werror \
62 || die
63
64 mmake -j1 || die
65 }
66
67 alx_generic_src_install()
68 {
69 cd ${SRCDIR}
70 mmake DESTDIR=${BINDIR} POSTINSTALL=NO \
71 gnulocaledir=${BINDIR}/usr/share/locale install || die
72
73 # systemd unit
74 minstallunit lpd.service || die
75
76 # ship some config files
77 minstallfile src/lpd.conf /etc/lprng || die
78 minstallfile conf/lpd.perms /etc/lprng || die
79 minstallfile -s printcap /etc/lprng || die
80 mlink lprng/printcap /etc/printcap || die
81
82 # install spooling directories with the right permissions
83 minstalldir /var/spool/lpd || die
84 minstalldir /var/spool/lpd/lp || die
85 mchown lp:lp /var/spool/lpd/lp || die
86 mchmod 0700 /var/spool/lpd/lp || die
87
88 # install missing docs
89 minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die
90 }
91
92 preinstall()
93 {
94 ${MLIBDIR}/mgroupadd -o "-g 9" lp
95 # add in dailout group to gain access to /dev/ttyS0/S1 for com port printing
96 ${MLIBDIR}/museradd -o "-u 9 -g lp -G dialout -d /var/spool/lpd -s /bin/false" lp
97
98 add_conf_prot_mask /etc/lprng
99 add_conf_prot_ignore /etc/lprng/printcap
100 }
101
102 postinstall()
103 {
104 mstartunit lpd.service
105 }
106
107 postremove()
108 {
109 mstopunit lpd.service
110 }