1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

New port: print/p910nd

p910nd is a small printer daemon intended for diskless workstations
that does not spool to disk but passes the job directly to the printer.

WWW: http://p910nd.sourceforge.net/

PR:		180446
Submitted by:	kozlov.sergey.404@gmail.com
This commit is contained in:
Kurt Jaeger 2014-08-09 19:54:58 +00:00
parent 4bb8b82fa9
commit 80b9d5c45e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364471
7 changed files with 118 additions and 0 deletions

View File

@ -170,6 +170,7 @@
SUBDIR += p5-PostScript-Simple
SUBDIR += p5-Text-PDF
SUBDIR += p5-XML-ApacheFOP
SUBDIR += p910nd
SUBDIR += panda
SUBDIR += papersize-default-a4
SUBDIR += papersize-default-letter

31
print/p910nd/Makefile Normal file
View File

@ -0,0 +1,31 @@
# $FreeBSD$
PORTNAME= p910nd
PORTVERSION= 0.97
CATEGORIES= print net
MASTER_SITES= SF
MAINTAINER= kozlov.sergey.404@gmail.com
COMMENT= Port 9100+n printer daemon
LICENSE= GPLv2
USES= tar:bzip2
USE_RC_SUBR= p910nd
P910ND_RUNDIR= /var/run/${PORTNAME}
PLIST_SUB= P910ND_RUNDIR=${P910ND_RUNDIR}
CFLAGS+= -DLOCKFILE_DIR="\"${P910ND_RUNDIR}\"" -DUSE_WRAP
do-build:
${CC} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c ${CFLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MANPREFIX}/man/man8
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/*.pl ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>

2
print/p910nd/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (p910nd-0.97.tar.bz2) = 4ac980a3ae24babae6f70f0a692625ece03a4a92c357fbb10d2e368386c3c26f
SIZE (p910nd-0.97.tar.bz2) = 20613

View File

@ -0,0 +1,28 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: p910nd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable p910nd:
#
# p910nd_enable="YES"
# # optional
# p910nd_flags=""
#
# Note:
# p910nd bind per default at the ipv6 address!
# If you want p910nd binding at ipv4 address, you have
# to use option 'p910nd_flags' with -i parameter
. /etc/rc.subr
name=p910nd
rcvar=p910nd_enable
command=%%PREFIX%%/sbin/p910nd
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,45 @@
--- p910nd.8.orig 2013-07-07 17:52:31.000000000 +0300
+++ p910nd.8 2013-07-07 18:08:04.000000000 +0300
@@ -11,7 +11,7 @@
.I p910nd
is a small daemon that copies any data received on the port
it is listening on to the corresponding printer port.
-It is primarily intended for diskless Linux hosts running as printer drivers
+It is primarily intended for diskless hosts running as printer drivers
but there is no reason why it could not be used on diskful hosts.
Port 9100 is copied to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2.
The default is port 9100 to /dev/lp0.
@@ -30,15 +30,6 @@
can be run as a standalone daemon or from (x)inetd.
It will automatically detect if it is running under (x)inetd.
.LP
-A sample SysVinit script,
-.IR p910nd.sh ,
-is provided for operation as a daemon.
-.I p910nd
-will change its name under ps to match the printer port, i.e.
-.I p9100d, p9101d
-and
-.IR p9102d .
-.LP
When running under (x)inetd, the
.I /etc/inetd.conf
entry should look something like this (with tcpwrappers protection):
@@ -74,7 +65,7 @@
spooler and sending all jobs to this host. You will probably
need to set up an intermediate queue anyway to provide print job filtering.
.LP
-If built with USE_WRAP, it uses the libwrap library (tcpwrappers).
+It uses the libwrap library (tcpwrappers).
Access control can be done with /etc/hosts.allow
and /etc/hosts.deny. The service name is p910nd.
.SH DIAGNOSTICS
@@ -83,7 +74,7 @@
.SH "SEE ALSO"
printcap(5), hosts_access(5)
.SH FILES
-/var/run/p9100d.pid, /var/lock/subsys/p9100d, /etc/hosts.allow, /etc/hosts.deny
+/var/run/p9100d.pid, /tmp/p9100d, /etc/hosts.allow, /etc/hosts.deny
.SH COPYRIGHT
.I p910nd
is under the GNU Public License Version 2

4
print/p910nd/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
p910nd is a small printer daemon intended for diskless workstations that does
not spool to disk but passes the job directly to the printer.
WWW: http://p910nd.sourceforge.net/

7
print/p910nd/pkg-plist Normal file
View File

@ -0,0 +1,7 @@
man/man8/p910nd.8.gz
sbin/p910nd
%%DATADIR%%/banner.pl
%%DATADIR%%/client.pl
@dirrmtry %%DATADIR%%
@exec [ -d %%P910ND_RUNDIR%% ] || mkdir -p %%P910ND_RUNDIR%%
@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%P910ND_RUNDIR%% 2>/dev/null; fi