[Midnightbsd-cvs] mports: mports/sysutils: Add LPRng, a new implementation that does not

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Jan 21 16:15:56 EST 2008


Log Message:
-----------
Add  LPRng, a new implementation that does not require a database.

Modified Files:
--------------
    mports/sysutils:
        Makefile (r1.59 -> r1.60)

Added Files:
-----------
    mports/sysutils/LPRng:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/sysutils/LPRng/files:
        lprng.in (r1.1)
        pkg-install.in (r1.1)
        pkg-message.in (r1.1)

-------------- next part --------------
--- /dev/null
+++ sysutils/LPRng/pkg-descr
@@ -0,0 +1,11 @@
+The LPRng software is an enhanced, extended, and portable implementation
+of the Berkeley LPR print spooler functionality.  While providing the
+same interface and meeting RFC1179 requirements, the implementation is
+completely different and provides support for the following features:
+lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic
+redirection of print queues; automatic job holding; highly verbose
+diagnostics; multiple printers serving a single queue; client programs
+do not need to run SUID root; greatly enhanced security checks; and a
+greatly improved permission and authorization mechanism.
+
+WWW: http://www.lprng.com/
--- /dev/null
+++ sysutils/LPRng/pkg-plist
@@ -0,0 +1,67 @@
+bin/cancel
+bin/lp
+bin/lpq
+bin/lpr
+bin/lprm
+bin/lpstat
+lib/liblpr.a
+lib/liblpr.la
+libexec/filters/lpbanner
+libexec/filters/lpf
+libexec/filters/pclbanner
+libexec/filters/psbanner
+sbin/checkpc
+sbin/lpc
+sbin/lpd
+sbin/lprng_certs
+sbin/lprng_index_certs
+%%NLS%%share/locale/de/LC_MESSAGES/LPRng.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/LPRng.mo
+%%PORTDOCS%%%%DOCSDIR%%/LISA98.ppt
+%%PORTDOCS%%%%DOCSDIR%%/LPRng-Reference.html
+%%PORTDOCS%%%%DOCSDIR%%/LPRng-Reference.pdf
+%%PORTDOCS%%%%DOCSDIR%%/LPRng.jpg
+%%PORTDOCS%%%%DOCSDIR%%/LPRng.png
+%%PORTDOCS%%%%DOCSDIR%%/LPRngT-L.jpg
+%%PORTDOCS%%%%DOCSDIR%%/LPRngT-L.png
+%%PORTDOCS%%%%DOCSDIR%%/LPRngT-S.jpg
+%%PORTDOCS%%%%DOCSDIR%%/LPRngT-S.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/LPRng.jpg
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/LPRngT-L.jpg
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/LPRngT-S.jpg
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/chooser.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/clients.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/configfiles.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/filter.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/index.html
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/network.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/parallel.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/pooling.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/printserver.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/samba.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/serial.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/spooler.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_add.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_advanced.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_checkpc.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_edit.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_ifhpfilter.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_nup.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_open.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_printcaps.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_reread.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_results.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_smb.png
+%%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook/x_write.png
+%%PORTDOCS%%%%DOCSDIR%%/license.txt
+%%PORTDOCS%%%%DOCSDIR%%/rfc1179.txt
+%%PORTDOCS%%%%DOCSDIR%%/y2k.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/Reference
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/PrintingCookbook
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at dirrm libexec/filters
+ at dirrm %%DATADIR%%
+%%CWD%%@cwd /
+%%SYSCONFDIR%%/lpd.conf.sample
+%%SYSCONFDIR%%/lpd.perms.sample
+%%SYSCONFDIR%%/printcap.sample
--- /dev/null
+++ sysutils/LPRng/Makefile
@@ -0,0 +1,118 @@
+# New ports collection makefile for:	LPRng
+# Date created:		January 21, 2008
+# Whom:			Lucas Holt <luke at midnightbsd.org>
+#
+# $MidnightBSD: mports/sysutils/LPRng/Makefile,v 1.1 2008/01/21 21:15:54 laffer1 Exp $
+#
+
+PORTNAME=	LPRng
+PORTVERSION=	3.8.32
+CATEGORIES=	sysutils print
+MASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
+		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
+		ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
+		ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
+		ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
+MASTER_SITE_SUBDIR=	LPRng/LPRng
+EXTRACT_SUFX=	.tgz
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	An Enhanced Printer Spooler
+
+LIB_DEPENDS=	gdbm.3:${PORTSDIR}/databases/gdbm
+
+CONFLICTS=	cups-base-1.[2-9]*
+
+GNU_CONFIGURE=	yes
+USE_LDCONFIG=	yes
+
+USE_RC_SUBR=	${PORTNAME:L}
+
+SUB_FILES=	pkg-message pkg-install
+SUB_LIST=	SYSCONFDIR="${SYSCONFDIR}"
+
+PKGDEINSTALL=	${PKGINSTALL}
+
+CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib" \
+		CPPFLAGS="-I${LOCALBASE}/include"
+CONFIGURE_ARGS=	\
+		--with-sbindir=${PREFIX}/sbin \
+		--with-filterdir=${PREFIX}/libexec/filters \
+		--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin" \
+		--with-lpd_conf_path=${SYSCONFDIR}/lpd.conf \
+		--with-lpd_perms_path=${SYSCONFDIR}/lpd.perms \
+		--with-printcap_path=/etc/printcap \
+		--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
+		--enable-gdbm=${LOCALBASE} \
+		--disable-werror
+
+.if defined(PORT_REPLACES_BASE_LPR)
+PREFIX=		/usr
+SYSCONFDIR=	/etc
+.endif
+
+.if defined(SYSCONFDIR)
+CONFIGURE_ARGS+=	--sysconfdir="${SYSCONFDIR}"
+PLIST_SUB+=	CWD="" SYSCONFDIR="${SYSCONFDIR:S,^/,,}"
+.else
+SYSCONFDIR=	${PREFIX}/etc
+PLIST_SUB+=	CWD="@comment " SYSCONFDIR="${SYSCONFDIR:S,^${PREFIX}/,,}"
+.endif
+
+MAN1=	lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 \
+	lpstat.1 lpq.1 lpr.1 lprm.1 monitor.1 pclbanner.1 lpbanner.1
+MAN5=	printcap.5 lpd.conf.5 lpd.perms.5
+MAN8=	lpc.8 checkpc.8 lpd.8
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_NLS)
+USE_GETTEXT=		yes
+PLIST_SUB+=		NLS=""
+.else
+CONFIGURE_ARGS+=	--disable-nls
+PLIST_SUB+=		NLS="@comment "
+.endif
+
+pre-everything::
+	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
+	@${ECHO_MSG} "  make PORT_REPLACES_BASE_LPR=yes clean all install"
+	@${ECHO_MSG} " OR"
+	@${ECHO_MSG} "  make CONFIGURE_SCRIPT=STANDARD_configuration clean all install"
+	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
+		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
+		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
+		${ECHO_MSG} "   ln -s /usr/share/man /usr/man"; \
+		${ECHO_MSG} "If you do not, you will retain the old BSD man pages."; \
+		${ECHO_MSG} "See the hier(7) man page for details of the BSD file system"; \
+		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
+		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for BSD.'; \
+	fi
+
+post-patch:
+	@${ECHO} "#! /bin/sh" > ${WRKSRC}/postinstall.freebsd.sh
+	@${REINPLACE_CMD} -e 's,$${INSTALL} $$$$i $${DATADIR}/$$$$i.sample,true &,' \
+		${WRKSRC}/Makefile.in
+
+pre-install: apply-slist
+	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+	@${INSTALL_DATA} ${WRKSRC}/lpd.conf ${SYSCONFDIR}/lpd.conf.sample
+	@${INSTALL_DATA} ${WRKSRC}/lpd.perms ${SYSCONFDIR}/lpd.perms.sample
+	@${INSTALL_DATA} ${WRKSRC}/printcap ${SYSCONFDIR}/printcap.sample
+.if !defined(NOPORTDOCS)
+	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
+	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}/Reference
+	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}/PrintingCookbook
+.for ext in html pdf ppt ps txt gif jpg png
+	@for i in `${LS} ${WRKSRC}/DOCS | ${GREP} "\.${ext}$$"`; \
+		do ${INSTALL_DATA} ${WRKSRC}/DOCS/$$i ${DOCSDIR}; done
+	@for i in `${LS} ${WRKSRC}/PrintingCookbook/HTML | ${GREP} "\.${ext}$$"`; \
+		do ${INSTALL_DATA} ${WRKSRC}/PrintingCookbook/HTML/$$i ${DOCSDIR}/PrintingCookbook; done;
+.endfor
+.endif
+	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	@${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ sysutils/LPRng/distinfo
@@ -0,0 +1,3 @@
+MD5 (LPRng-3.8.32.tgz) = edbd3a381a0cc6843df7507e8f9103f1
+SHA256 (LPRng-3.8.32.tgz) = a3f9069846bf1b38164eaec0273668ae8cabd300577801912fa0efae6d541a31
+SIZE (LPRng-3.8.32.tgz) = 11918986
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/sysutils/Makefile,v
retrieving revision 1.59
retrieving revision 1.60
diff -L sysutils/Makefile -L sysutils/Makefile -u -r1.59 -r1.60
--- sysutils/Makefile
+++ sysutils/Makefile
@@ -4,6 +4,7 @@
     COMMENT = System utilities
 
     SUBDIR += 915resolution
+    SUBDIR += LPRng
     SUBDIR += battmond
     SUBDIR += bsd-splash-changer
     SUBDIR += bsdstats
--- /dev/null
+++ sysutils/LPRng/files/pkg-install.in
@@ -0,0 +1,119 @@
+#! /bin/sh
+
+prefix=%%PREFIX%%
+sysconfdir=%%SYSCONFDIR%%
+
+case "x$2" in
+
+"xPRE-INSTALL")
+
+	# Preserve original files from being overwritten.
+
+	if [ "x$prefix" = "x/usr" ]; then
+		cd $prefix
+		for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+			share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+			share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+			share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+			share/man/man8/lpd.8.gz ; do
+			cp -p $i $i.orig
+		done
+	fi
+
+	;;
+
+"xPOST-INSTALL")
+
+	cd $sysconfdir
+
+	# Preserve original configuration files from being overwritten.
+	# Restore previously saved configuration if possible.
+
+	if [ "x$sysconfdir" = "x/etc" ]; then
+		for i in lpd.conf lpd.perms printcap; do
+			[ -f $i ] && mv $i $i.orig
+			[ -f $i.saved ] && mv $i.saved $i || cp $i.sample $i
+		done
+	else
+		for i in lpd.conf lpd.perms printcap; do
+			[ -f $i.saved ] && mv $i.saved $i || cp $i.sample $i
+		done
+	fi
+
+	# This is a trick to detect if the user installed a new world at deinstall stage.
+
+	if [ "x$prefix" = "x/usr" ]; then
+		cd $prefix
+		for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+			share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+			share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+			share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+			share/man/man8/lpd.8.gz ; do
+			touch $i.orig
+		done
+	fi
+
+	;;
+
+"xDEINSTALL")
+
+	cd $sysconfdir
+
+	# Remove unchanged files.
+
+	for i in lpd.conf lpd.perms printcap; do
+		cmp -s $i $i.sample && rm -f $i
+	done
+
+	# Remove backup files if installworld overwrited LPRng files.
+
+	if [ "x$prefix" = "x/usr" ]; then
+		cd $prefix
+		for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+			share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+			share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+			share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+			share/man/man8/lpd.8.gz ; do
+			[ $i -nt $i.orig ] && rm $i.orig
+		done
+	fi
+
+	;;
+
+"xPOST-DEINSTALL")
+
+	cd $sysconfdir
+
+	# Save remaining modified files so we can restore them at next install.
+	# Restore original files when LPRng files haven't changed.
+
+	for i in lpd.conf lpd.perms printcap; do
+		if [ "x$sysconfdir" = "x/etc" ]; then
+			if [ -f $i ]; then
+				mv $i $i.saved
+			else
+				[ -f $i.orig ] && mv $i.orig $i
+			fi
+		else
+			[ -f $i ] && mv $i $i.saved
+		fi
+	done
+
+	# Restore backup files.
+
+	if [ "x$prefix" = "x/usr" ]; then
+		cd $prefix
+		for i in bin/lp bin/lpq bin/lpr bin/lprm sbin/lpc sbin/lpd \
+			share/man/man1/lp.1.gz share/man/man1/lpq.1.gz \
+			share/man/man1/lpr.1.gz share/man/man1/lprm.1.gz \
+			share/man/man5/printcap.5.gz share/man/man8/lpc.8.gz \
+			share/man/man8/lpd.8.gz ; do
+			[ -f $i.orig ] && mv $i.orig $i
+		done
+	fi
+
+	;;
+
+esac
+
+exit 0
--- /dev/null
+++ sysutils/LPRng/files/pkg-message.in
@@ -0,0 +1,20 @@
+
+To enable LPRng, put the following lines in /etc/rc.conf
+
+lpd_enable="NO"
+lprng_enable="YES"
+
+LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
+
+For further information, see the LPRng Documentation:
+  %%DOCSDIR%%
+
+The LPRng Web Site is http://www.lprng.com
+
+Commercial support is available from Astart Technologies:
+
+Patrick Powell                 Astart Technologies
+papowell at astart.com            6741 Convoy Court
+Network and System             San Diego, CA 92111
+  Consulting                   858-874-6543 FAX 858-751-2435
+LPRng - Print Spooler (http://www.lprng.com)
--- /dev/null
+++ sysutils/LPRng/files/lprng.in
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# PROVIDE: lprng
+# REQUIRE: LOGIN
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# lprng_enable (bool): Set to NO by default.
+#                      Set it to YES to enable lprng.
+#
+
+. %%RC_SUBR%%
+
+name="lprng"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/sbin/lpd
+
+required_files="/etc/printcap %%SYSCONFDIR%%/lpd.conf %%SYSCONFDIR%%/lpd.perms"
+
+start_precmd=start_precmd
+
+start_precmd()
+{
+	if checkyesno lpd_enable; then
+		warn "lpd must be disabled"
+		return 1
+	fi
+
+	%%PREFIX%%/sbin/checkpc -f
+}
+
+load_rc_config $name
+
+: ${lprng_enable="NO"}
+
+run_rc_command "$1"


More information about the Midnightbsd-cvs mailing list