Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1787 - (show annotations) (download)
Fri Sep 23 16:13:14 2011 UTC (12 years, 7 months ago) by niro
File size: 2366 byte(s)
auto added: ver bump to 3.8.B-r2
1 # $Id$
2
3 PNAME="lprng"
4 PVER="3.8.B"
5 PBUILD="r2"
6
7 PCATEGORIE="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 MCORE_ONLY_KEEP="etc usr/bin usr/sbin usr/$(mlibdir)/filters usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.*"
18 sminclude mtools mcore-split
19
20 # lprng.rc cvs revision
21 CVS_REV=1.3
22
23 SRC_URI=(
24 sourceforge://${PNAME}/${SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/lprng.rc-${CVS_REV}
27 mirror://${PNAME}/printcap
28 )
29
30 UP2DATE="updatecmd_sourceforge ${PNAME} LPRng"
31
32 src_prepare()
33 {
34 # warn about /proc in chroot environments
35 [[ ! -d /proc/sys ]] && die "Please make sure /proc is mounted in chroot-environments."
36
37 munpack ${SRCFILE} || die
38 }
39
40 src_compile()
41 {
42 cd ${SRCDIR}
43
44 mconfigure \
45 --libexecdir=/usr/$(mlibdir)/lprng \
46 --sysconfdir=/etc/lprng \
47 --with-lpd_conf_path=/etc/lprng/lpd.conf \
48 --with-lpd_perms_path=/etc/lprng/lpd.perms \
49 --with-userid=lp \
50 --with-groupid=lp \
51 --enable-shared \
52 --disable-kerberos \
53 --disable-ssl \
54 --disable-setuid \
55 --disable-strip \
56 --disable-werror \
57 || die
58
59 mmake -j1 || die
60 }
61
62 mcore_generic_src_install()
63 {
64 cd ${SRCDIR}
65 mmake DESTDIR=${BINDIR} POSTINSTALL=NO \
66 gnulocaledir=${BINDIR}/usr/share/locale install || die
67
68 # install our initscript
69 minstallrc lprng.rc-${CVS_REV} lprng || die
70
71 # ship some config files
72 minstallfile src/lpd.conf /etc/lprng || die
73 minstallfile conf/lpd.perms /etc/lprng || die
74 minstallfile -s printcap /etc/lprng || die
75 mlink lprng/printcap /etc/printcap || die
76
77 # install spooling directories with the right permissions
78 minstalldir /var/spool/lpd || die
79 minstalldir /var/spool/lpd/lp || die
80 mchown lp:lp /var/spool/lpd/lp || die
81 mchmod 0700 /var/spool/lpd/lp || die
82
83 # install missing docs
84 minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die
85 }
86
87 preinstall()
88 {
89 ${MLIBDIR}/mgroupadd -o "-g 9" lp
90 # add in dailout group to gain access to /dev/ttyS0/S1 for com port printing
91 ${MLIBDIR}/museradd -o "-u 9 -g lp -G dialout -d /var/spool/lpd -s /bin/false" lp
92
93 add_conf_prot_mask /etc/lprng
94 add_conf_prot_ignore /etc/lprng/printcap
95 }
96
97 postinstall()
98 {
99 mstartservice lprng /usr/sbin/lpd
100 }
101
102 postremove()
103 {
104 mstopservice lprng /usr/sbin/lpd
105 }