Contents of /smage/trunk/core/lprng/lprng-3.8.B-r1.smage2
Parent Directory | Revision Log
Revision 1636 -
(show annotations)
(download)
Wed Mar 9 22:09:57 2011 UTC (13 years, 6 months ago) by niro
File size: 2275 byte(s)
Wed Mar 9 22:09:57 2011 UTC (13 years, 6 months ago) by niro
File size: 2275 byte(s)
-fixed src_install
1 | # $Id: lprng-3.8.28-r5.smage2 159 2010-04-26 19:51:44Z niro $ |
2 | |
3 | PNAME="lprng" |
4 | PVER="3.8.B" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="net-print" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="LPRng is an enhanced implementation of the Berkeley LPR print spooler." |
11 | HOMEPAGE="http://www.lprng.com/" |
12 | |
13 | DEPEND=">= virtual/glibc" |
14 | |
15 | SRCFILE="LPRng-${PVER}.tar.gz" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | MCORE_ONLY_KEEP="etc usr/bin usr/sbin usr/$(mlibdir)/filters usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.*" |
19 | sminclude mtools mcore-split |
20 | |
21 | # lprng.rc cvs revision |
22 | CVS_REV=1.3 |
23 | |
24 | SRC_URI=( |
25 | sourceforge://${PNAME}/${SRCFILE} |
26 | mirror://${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/lprng.rc-${CVS_REV} |
28 | mirror://${PNAME}/printcap |
29 | ) |
30 | |
31 | UP2DATE="updatecmd_sourceforge ${PNAME} LPRng" |
32 | |
33 | src_prepare() |
34 | { |
35 | # warn about /proc in chroot environments |
36 | [[ ! -d /proc/sys ]] && die "Please make sure /proc is mounted in chroot-environments." |
37 | |
38 | munpack ${SRCFILE} || die |
39 | } |
40 | |
41 | src_compile() |
42 | { |
43 | cd ${SRCDIR} |
44 | |
45 | mconfigure \ |
46 | --libexecdir=/usr/$(mlibdir)/lprng \ |
47 | --sysconfdir=/etc/lprng \ |
48 | --with-lpd_conf_path=/etc/lprng/lpd.conf \ |
49 | --with-lpd_perms_path=/etc/lprng/lpd.perms \ |
50 | --with-userid=lp \ |
51 | --with-groupid=lp \ |
52 | --enable-shared \ |
53 | --disable-kerberos \ |
54 | --disable-ssl \ |
55 | --disable-setuid \ |
56 | --disable-strip \ |
57 | --disable-werror \ |
58 | || die |
59 | |
60 | mmake -j1 || die |
61 | } |
62 | |
63 | mcore_generic_src_install() |
64 | { |
65 | cd ${SRCDIR} |
66 | mmake DESTDIR=${BINDIR} POSTINSTALL=NO \ |
67 | gnulocaledir=${BINDIR}/usr/share/locale install || die |
68 | |
69 | # install our initscript |
70 | minstallrc lprng.rc-${CVS_REV} lprng || die |
71 | |
72 | # ship some config files |
73 | minstallfile src/lpd.conf /etc/lprng || die |
74 | minstallfile conf/lpd.perms /etc/lprng || die |
75 | minstallfile -s printcap /etc/lprng || die |
76 | mlink lprng/printcap /etc/printcap || die |
77 | |
78 | # install spooling directories with the right permissions |
79 | minstalldir /var/spool/lpd || die |
80 | minstalldir /var/spool/lpd/lp || die |
81 | mchown lp:lp /var/spool/lpd/lp || die |
82 | mchmod 0700 /var/spool/lpd/lp || die |
83 | |
84 | # install missing docs |
85 | minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die |
86 | } |
87 | |
88 | preinstall() |
89 | { |
90 | ${MLIBDIR}/mgroupadd -o "-g 9" lp |
91 | ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp |
92 | } |
93 | |
94 | postinstall() |
95 | { |
96 | mstartservice lprng /usr/sbin/lpd |
97 | } |
98 | |
99 | postremove() |
100 | { |
101 | mstopservice lprng /usr/sbin/lpd |
102 | } |