Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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