Magellan Linux

Annotation of /smage/branches/alx07x-stable/core/lprng/lprng-3.8.C-r6.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14035 - (hide annotations) (download)
Fri Jul 3 07:04:56 2020 UTC (3 years, 10 months ago) by niro
Original Path: smage/trunk/core/lprng/lprng-3.8.C-r6.smage2
File size: 2241 byte(s)
auto added: ver bump to 3.8.C-r6
1 niro 14035 # $Id$
2    
3     PNAME="lprng"
4     PVER="3.8.C"
5     PBUILD="r6"
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     SPECIAL_FUNCTIONS="pkg_setup"
36    
37     UP2DATE="updatecmd_sourceforge ${PNAME} gz"
38    
39     pkg_setup()
40     {
41     mgroupadd -o "-g 9" lp
42     # add in dailout group to gain access to /dev/ttyS0/S1 for com port printing
43     museradd -o "-u 9 -g lp -G dialout -d /var/spool/lpd -s /bin/false" lp
44     }
45    
46     src_prepare()
47     {
48     [[ ! -d /proc/sys ]] && die "Please make sure /proc is mounted in chroot-environments."
49     munpack ${SRCFILE} || die
50     }
51    
52     src_compile()
53     {
54     cd ${SRCDIR}
55    
56     mconfigure \
57     --libexecdir=/usr/$(mlibdir)/lprng \
58     --sysconfdir=/etc/lprng \
59     --with-lpd_conf_path=/etc/lprng/lpd.conf \
60     --with-lpd_perms_path=/etc/lprng/lpd.perms \
61     --with-userid=lp \
62     --with-groupid=lp \
63     --enable-shared \
64     --disable-kerberos \
65     --disable-ssl \
66     || die
67    
68     mmake -j1 || die
69     }
70    
71     alx_generic_src_install()
72     {
73     cd ${SRCDIR}
74     mmake DESTDIR=${BINDIR} POSTINSTALL=NO \
75     gnulocaledir=${BINDIR}/usr/share/locale install || die
76    
77     # systemd unit
78     minstallunit lpd.service || die
79    
80     # ship some config files
81     minstallfile src/lpd.conf /etc/lprng || die
82     minstallfile conf/lpd.perms /etc/lprng || die
83     minstallfile -s printcap /etc/lprng || die
84     mlink lprng/printcap /etc/printcap || die
85    
86     # install spooling directories with the right permissions
87     minstalldir /var/spool/lpd || die
88     minstalldir /var/spool/lpd/lp || die
89     mchown lp:lp /var/spool/lpd/lp || die
90     mchmod 0700 /var/spool/lpd/lp || die
91    
92     # install missing docs
93     minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die
94     }
95    
96     preinstall()
97     {
98     pkg_setup
99    
100     add_conf_prot_mask /etc/lprng
101     add_conf_prot_ignore /etc/lprng/printcap
102     }
103    
104     postinstall()
105     {
106     mstartunit lpd.service
107     }
108    
109     postremove()
110     {
111     mstopunit lpd.service
112     }