added lpdsrv, a small print server daemon

This commit is contained in:
Georg Schwarz 2006-12-03 15:30:44 +00:00 committed by Thomas Klausner
parent db9d7ed390
commit 82f743a3de
6 changed files with 81 additions and 0 deletions

4
lpdsrv/DESCR Normal file
View file

@ -0,0 +1,4 @@
lpdsrv is a small non-spooling LPD server (RFC1179) written by
Steve Flynn and Simon Byrnand. It was developed on Linux, and it is
unclear to what extend it supports other systems.
lpdsrv is used as part of the fli4l project, for example.

21
lpdsrv/Makefile Normal file
View file

@ -0,0 +1,21 @@
# $NetBSD: Makefile,v 1.1.1.1 2006/12/03 15:30:44 gschwarz Exp $
DISTNAME= ${PKGNAME:C/-.*$//}
PKGNAME= lpdsrv-1.4
CATEGORIES= net
MASTER_SITES= http://www.ledow.org.uk/Freesco/Programs/
EXTRACT_SUFX= .tgz
MAINTAINER= schwarz@NetBSD.org
COMMENT= Non-spooling LPD server (RFC1179)
NO_CONFIGURE= YES
WRKSRC= ${WRKDIR}
EXTRACT_USING= gtar # archive does not properly extract using BSD tar
INSTALLATION_DIRS= sbin
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lpdsrv ${PREFIX}/sbin
.include "../../mk/bsd.pkg.mk"

2
lpdsrv/PLIST Normal file
View file

@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2006/12/03 15:30:44 gschwarz Exp $
sbin/lpdsrv

7
lpdsrv/distinfo Normal file
View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1.1.1 2006/12/03 15:30:44 gschwarz Exp $
SHA1 (lpdsrv.tgz) = 33d0a364ed5872b3cbc01461679fbdcac447314b
RMD160 (lpdsrv.tgz) = a05a91da720b4c487239340249af70325e0239f5
Size (lpdsrv.tgz) = 11830 bytes
SHA1 (patch-aa) = d0ba149176139ea7c061173264e117592f38d65e
SHA1 (patch-ab) = 9125347d8a48dc169f8502904cdc9ba56a20b2a0

35
lpdsrv/patches/patch-aa Normal file
View file

@ -0,0 +1,35 @@
$NetBSD: patch-aa,v 1.1.1.1 2006/12/03 15:30:44 gschwarz Exp $
--- lpdsrv.c.orig 2006-11-05 12:04:55.000000000 +0100
+++ lpdsrv.c 2006-11-05 12:11:21.000000000 +0100
@@ -70,6 +70,7 @@
* Up to ten name:device pairs are supported for each queue type
*/
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
@@ -80,7 +81,12 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
+#ifdef __linux__
#include <linux/lp.h>
+#endif
+#ifndef LPRESET
+#define LPRESET 0x060c /* reset printer */
+#endif
#define TBUF_LEN 1024
#define QNAME_LEN 32
@@ -134,7 +140,8 @@
int argc;
char *argv[];
{
- int i, j, sockfd, newsockfd, clilen, RejectNet;
+ int i, j, sockfd, newsockfd, RejectNet;
+ unsigned int clilen;
struct sockaddr_in CliAddr, ServAddr;
int TCPPort = 515;
int Timeout = 300;

12
lpdsrv/patches/patch-ab Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: patch-ab,v 1.1.1.1 2006/12/03 15:30:44 gschwarz Exp $
--- Makefile.orig 2006-11-05 12:08:05.000000000 +0100
+++ Makefile 2006-11-05 12:08:21.000000000 +0100
@@ -1,5 +1,5 @@
-CFLAGS = -O2 -I./ -I/usr/include/bsd
-LDLIBS = -lbsd
+#CFLAGS = -O2 -I./ -I/usr/include/bsd
+#LDLIBS = -lbsd
all: lpdsrv