# $Id$ PNAME="lprng" PVER="3.8.C" PBUILD="r6" PCAT="net-print" DESCRIPTION="LPRng is an enhanced implementation of the Berkeley LPR print spooler." HOMEPAGE="http://www.lprng.com/" DEPEND=">= virtual/glibc" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" ALX_PKG_KEEP="etc usr/bin usr/sbin usr/lib/systemd usr/$(mlibdir)/filters usr/$(mlibdir)/*.so.*" sminclude mtools systemd alx-split # lprng.rc cvs revision CVS_REV=1.3 SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/lpd.service mirror://${PNAME}/printcap ) SPECIAL_FUNCTIONS="pkg_setup" UP2DATE="updatecmd_sourceforge ${PNAME} gz" pkg_setup() { mgroupadd -o "-g 9" lp # add in dailout group to gain access to /dev/ttyS0/S1 for com port printing museradd -o "-u 9 -g lp -G dialout -d /var/spool/lpd -s /bin/false" lp } src_prepare() { [[ ! -d /proc/sys ]] && die "Please make sure /proc is mounted in chroot-environments." munpack ${SRCFILE} || die } src_compile() { cd ${SRCDIR} mconfigure \ --libexecdir=/usr/$(mlibdir)/lprng \ --sysconfdir=/etc/lprng \ --with-lpd_conf_path=/etc/lprng/lpd.conf \ --with-lpd_perms_path=/etc/lprng/lpd.perms \ --with-userid=lp \ --with-groupid=lp \ --enable-shared \ --disable-kerberos \ --disable-ssl \ || die mmake -j1 || die } alx_generic_src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} POSTINSTALL=NO \ gnulocaledir=${BINDIR}/usr/share/locale install || die # systemd unit minstallunit lpd.service || die # ship some config files minstallfile src/lpd.conf /etc/lprng || die minstallfile conf/lpd.perms /etc/lprng || die minstallfile -s printcap /etc/lprng || die mlink lprng/printcap /etc/printcap || die # install spooling directories with the right permissions minstalldir /var/spool/lpd || die minstalldir /var/spool/lpd/lp || die mchown lp:lp /var/spool/lpd/lp || die mchmod 0700 /var/spool/lpd/lp || die # install missing docs minstalldocs ChangeLog CHANGES CONTRIBUTORS COPYRIGHT LICENSE README TODO || die } preinstall() { pkg_setup add_conf_prot_mask /etc/lprng add_conf_prot_ignore /etc/lprng/printcap } postinstall() { mstartunit lpd.service } postremove() { mstopunit lpd.service }