ports/59862: update LPRng to 3.8.23, also fix build on current

Rong-En Fan rafan at infor.org
Sun Nov 30 22:20:18 UTC 2003


>Number:         59862
>Category:       ports
>Synopsis:       update LPRng to 3.8.23, also fix build on current
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 30 14:20:12 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 5.2-BETA i386
>Organization:
Dept. of CSIE, NTU, Taiwan
>Environment:
FreeBSD foo.csie.ntu.edu.tw 5.2-BETA FreeBSD 5.2-BETA #0: Fri Nov 28 02:16:26 CST 2003     rafan at foo.csie.ntu.edu.tw:/foo  i386

>Description:
	update LPRng to 3.8.23, this version can be build on current
	
>How-To-Repeat:

>Fix:

	apply this diff
	
diff -ruN LPRng.orig/Makefile LPRng/Makefile
--- LPRng.orig/Makefile	Sat Nov 29 04:38:16 2003
+++ LPRng/Makefile	Sat Nov 29 11:46:37 2003
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	LPRng
-PORTVERSION=	3.8.21
+PORTVERSION=	3.8.23
 CATEGORIES=	sysutils print
 MASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
 		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
@@ -22,7 +22,7 @@
 LIB_DEPENDS=	gdbm.3:${PORTSDIR}/databases/gdbm
 
 GNU_CONFIGURE=	yes
-USE_LIBTOOL=	yes
+#USE_LIBTOOL=	yes
 INSTALLS_SHLIB=	yes
 
 CONFIGURE_ARGS=	\
@@ -32,8 +32,8 @@
 		--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
 		--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \
 		--with-printcap_path=/etc/printcap \
-		--with-ldopts="-L${LOCALBASE}/lib" \
-		--with-ccopts="-I${LOCALBASE}/include" \
+		LDFLAGS="-L${LOCALBASE}/lib" \
+		CPPFLAGS="-I${LOCALBASE}/include" \
 		--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
 		--enable-gdbm=${LOCALBASE}
 .if defined(PREFIX)
@@ -50,13 +50,11 @@
 
 .include <bsd.port.pre.mk>
 
-#.if ${OSVERSION} >= 501000
-#BROKEN=		"Does not compile"
-#.endif
-
 pre-everything::
 	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
 	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc 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"; \
@@ -70,9 +68,15 @@
 post-install:
 .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}/HOWTO | ${GREP} "\.${ext}$$"`; \
-		do ${INSTALL_DATA} ${WRKSRC}/HOWTO/$$i ${DOCSDIR}; done
+
+
+	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
 	@${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
diff -ruN LPRng.orig/distinfo LPRng/distinfo
--- LPRng.orig/distinfo	Mon Apr 21 21:33:51 2003
+++ LPRng/distinfo	Sat Nov 29 11:24:48 2003
@@ -1 +1 @@
-MD5 (LPRng-3.8.21.tgz) = 396d0a49a4533ad973176efa9bf054b1
+MD5 (LPRng-3.8.23.tgz) = d0522cf8af07f14c00e43a7f506dbd3c
diff -ruN LPRng.orig/pkg-deinstall LPRng/pkg-deinstall
--- LPRng.orig/pkg-deinstall	Mon Apr 21 21:33:51 2003
+++ LPRng/pkg-deinstall	Sun Nov 30 04:26:31 2003
@@ -2,15 +2,16 @@
 PREFIX=/usr/local
 LPD_PATH="/usr/local/sbin/lpd"
 INSTALL="/usr/bin/install -c -o root -g wheel"
-LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
-LPD_CONF_PATH="/usr/local/etc/lpd.conf"
+LPD_PERMS_PATH="/usr/local/etc/lpd/lpd.perms"
+LPD_CONF_PATH="/usr/local/etc/lpd/lpd.conf"
 PRINTCAP_PATH="/usr/local/etc/printcap"
 SYSCONFDIR=/usr/local/etc
 SBINDIR=/usr/local/sbin
 FILTER_DIR=/usr/local/libexec/filters
 LOCKFILE="/var/run/lpd"
+CONFIG_SUBDIR=lpd
 PSHOWALL="-ax"
-VERSION=3.8.21
+VERSION=3.8.23
 INIT=
 MANDIR=/usr/local/man
 #
@@ -24,5 +25,12 @@
 if [ "X$2" = "XDEINSTALL" ] ; then
 	echo "Stopping LPD"
 	killall -INT lpd
+	if [ -f /etc/rc.conf ] ; then
+		perl -spi.bak -e '$_ = "" if( /lprng_enable/ );' ${DESTDIR}/etc/rc.conf 
+	fi
+	init=/usr/local/etc/rc.d/lprng.sh
+	if [ -f $init ] ; then
+		rm -f $init
+	fi
 fi
 exit 0
diff -ruN LPRng.orig/pkg-install LPRng/pkg-install
--- LPRng.orig/pkg-install	Mon Apr 21 21:33:51 2003
+++ LPRng/pkg-install	Mon Dec  1 06:10:59 2003
@@ -2,15 +2,16 @@
 PREFIX=/usr/local
 LPD_PATH="/usr/local/sbin/lpd"
 INSTALL="/usr/bin/install -c -o root -g wheel"
-LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
-LPD_CONF_PATH="/usr/local/etc/lpd.conf"
+LPD_PERMS_PATH="/usr/local/etc/lpd/lpd.perms"
+LPD_CONF_PATH="/usr/local/etc/lpd/lpd.conf"
 PRINTCAP_PATH="/usr/local/etc/printcap"
 SYSCONFDIR=/usr/local/etc
 SBINDIR=/usr/local/sbin
 FILTER_DIR=/usr/local/libexec/filters
 LOCKFILE="/var/run/lpd"
+CONFIG_SUBDIR=lpd
 PSHOWALL="-ax"
-VERSION=3.8.21
+VERSION=3.8.23
 INIT=
 MANDIR=/usr/local/man
 #
@@ -32,6 +33,7 @@
 #
 echo RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
 if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
+
 fix () {
     v=`echo $1 | sed -e 's/[:;].*//'`;
     p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
@@ -44,36 +46,66 @@
         echo "Directory $d does not exist!"
         mkdir -p $d
     fi
+	old_version=` echo $p | sed -e "s,/$CONFIG_SUBDIR/,/,"`
+	if [ ! -f "$p" -a "$old_version" != "$p" -a -f "$old_version" ] ; then
+		echo "WARNING: Location of $p changed from $old_version"
+		echo "   Copying $old_version to $p"
+		cp "$old_version" "$p" || echo "cannot copy $old_version to $p"
+	fi
     if [ -f $v.sample ] ; then
-        if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
+        if [ $v.sample != $p.sample ] ; then ${INSTALL} $v.sample $p.sample; fi
     elif [ -f $v ] ; then
-        if [ $v != $p.sample ] ; then cp $v $p.sample; fi
+        if [ $v != $p.sample ] ; then ${INSTALL} $v $p.sample; fi
     else
         echo "Do not have $v.sample or $v"
     fi
     if [ ! -f $p.sample ] ; then
         echo "Do not have $p.sample"
     elif [ ! -f $p ] ; then
-        chmod 644 $p.sample
-        cp $p.sample $p;
-        chmod 644 $p;
+        ${INSTALL} -m 644 $p.sample $p;
     fi;
 }
+
+startserver(){
+	cnf=${DESTDIR}/etc/rc.conf
+	if [ -f ${cnf} ] ; then
+		if grep lprng ${cnf} ; then
+			: # no changes
+		else
+			echo 'lprng_enable="YES"' >> ${cnf}
+		fi
+	fi
+	echo "Stopping LPD"
+	killall lpd || true
+	sleep 2;
+	# check the printcap information
+	echo "Checking Printcap Info and fixing permissions"
+	${SBINDIR}/checkpc -f || true
+	# restart the server
+	echo "Restarting server"
+	sh $init start || true
+	echo "Done"
+}
+
 # we use the /usr/local/etc/rc.d method to start
-# lpd
+init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
+
 # we have to take them from one place and put in another
 if [ "X$MAKEPACKAGE" = "XYES" ] ; then
-    hold=${DESTDIR}${PREFIX}/etc
+    hold=${DESTDIR}${SYSCONFDIR}/lpd
     echo "Setting up configuration files path for package" ${hold}
     # we put files into the destination
     if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
-    cp lpd.perms ${hold}/lpd.perms.sample
-    cp lpd.conf ${hold}/lpd.conf.sample
-    cp printcap ${hold}/printcap.sample
-    if [ "$INIT" != no ] ; then
-        cp init.freebsd ${hold}/lprng.sh
-    fi
-elif [ "X$MAKEINSTALL" = XYES ] ; then
+    ${INSTALL} lpd.perms ${hold}/lpd.perms.sample
+    ${INSTALL} lpd.conf ${hold}/lpd.conf.sample
+    ${INSTALL} printcap ${hold}/printcap.sample
+	${INSTALL} init.freebsd ${hold}/lprng.sh.sample
+	exit 0
+fi
+
+if [ "X$MAKEINSTALL" = XYES ] ; then
+    hold=${DESTDIR}${SYSCONFDIR}/lpd
+    echo "Setting up configuration files path for installation" ${hold}
 	# we have the port pre-install operation
 	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
 		# we have the dreaded standard installation
@@ -81,60 +113,53 @@
 		echo "Creating symbolic link from /usr/man to /usr/share/man"
 		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
 	fi
-    echo "Setting up configuration files path for installation" ${hold}
-    hold=${DESTDIR}${PREFIX}/etc
     if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
-    cp lpd.perms ${hold}/lpd.perms.sample
-    cp lpd.conf ${hold}/lpd.conf.sample
-    cp printcap ${hold}/printcap.sample
+    ${INSTALL} lpd.perms ${hold}/lpd.perms.sample
+    ${INSTALL} lpd.conf ${hold}/lpd.conf.sample
+    ${INSTALL} printcap ${hold}/printcap.sample
+	${INSTALL} init.freebsd ${hold}/lprng.sh.sample
 
     fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
     fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
     fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
-
     if [ "$INIT" != no ] ; then
-		if [ -f /etc/rc.conf ] ; then
-			perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf 
-		fi
-		cp init.freebsd ${hold}/lprng.sh
-		init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
 		echo "Setting up init script $init using init.freebsd"
 		if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
 		rm -f $init
-		cp init.freebsd $init
-		chmod 744 $init
+		${INSTALL} -m 755 init.freebsd $init
+		#startserver;
+	fi
 
-		echo "Stopping LPD"
-		kill -INT `ps ${PSHOWALL} | awk '/lpd/{ print $1;}'` >/dev/null 2>&1
-		sleep 2;
-		# check the printcap information
-		echo "Checking Printcap Info and fixing permissions"
-		${SBINDIR}/checkpc -f
-		# restart the server
-		echo "Restarting server"
-		sh $init start
-    fi
-elif [ "X$2" = "XPOST-INSTALL" ] ; then
-    # when doing an install from a package we get the file from the package
-    hold=etc
+	exit 0
+fi
+
+# run from a package
+if [ "X$2" = "XPOST-INSTALL" ] ; then
+    # when doing an install from a package we get the file from the hold locations
+    hold=etc/lpd
+	echo "Installing configuration files from `pwd` - $hold - `ls $hold`"
     if [ -f ${hold}/lpd.perms.sample ] ; then
         fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
         fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
         fix ${hold}/printcap "${PRINTCAP_PATH}"
+		echo "Setting up init script $init.sample using ${hold}/lprng.sh.sample"
+		${INSTALL} -c -m 755 ${hold}/lprng.sh.sample $init.sample;
 		if [ "$INIT" != no ] ; then
-			init=/usr/local/etc/rc.d/lprng.sh
-			cp ${hold}/lprng.sh $init;
-			chmod 755 $init;
-			if [ -f /etc/rc.conf ] ; then
-				perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf 
-			fi
+			echo "Setting up init script $init using $init.sample"
+			${INSTALL} -c -m 755 $init.sample $init;
+			#startserver;
 		fi
     else
         echo "WARNING: configuration files missing from package! CWD " `pwd`
-        ls
+		echo "Contents"
+		ls
+		echo "Hold $hold"
+		ls $hold
         exit 1
     fi
-elif [ "X$2" = "XPRE-INSTALL" ] ; then
+	exit 0;
+fi
+if [ "X$2" = "XPRE-INSTALL" ] ; then
 	# we have the port pre-install operation
 	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
 		# we have the dreaded standard installation
@@ -142,5 +167,6 @@
 		echo "Creating symbolic link from /usr/man to /usr/share/man"
 		v=`ln -s /usr/share/man /usr/man`;
 	fi
+	exit 0
 fi
 exit 0
diff -ruN LPRng.orig/pkg-message LPRng/pkg-message
--- LPRng.orig/pkg-message	Mon Apr 21 21:33:51 2003
+++ LPRng/pkg-message	Mon Dec  1 05:46:03 2003
@@ -1,13 +1,16 @@
+If LPRng is not activated at installation time,
+to activate the LPRng printing system do the following:
 
-To activate the LPRng printing system do the following:
-
-- set `lpd_enable=NO' in /etc/rc.conf.
+On FreeBSD:
+  set'lpd_enable=NO' and 'lprng_enable=YES' in /etc/rc.conf.
   The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
 
-- run checkpc -f to make sure that necessary files have been created
+  If lprng_enable != NO then the LPRng lpd will run.
+
+- run 'checkpc -f' to make sure that necessary files have been created
 
-- reboot or kill the old lpd (`killall lpd') and
-  start the new one (/usr/local/etc/rc.d/lprng.sh start)
+- reboot or kill the old lpd using 'killall lpd' and
+  start the new one using '/usr/local/etc/rc.d/lprng.sh start'.
 
 LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
 
diff -ruN LPRng.orig/pkg-plist LPRng/pkg-plist
--- LPRng.orig/pkg-plist	Thu Jul 10 21:31:18 2003
+++ LPRng/pkg-plist	Mon Dec  1 06:03:51 2003
@@ -1,14 +1,18 @@
+bin/cancel
+bin/lp
 bin/lpq
 bin/lpr
 bin/lprm
 bin/lpstat
+etc/lpd.conf
 etc/lpd.conf.sample
+etc/lpd.perms
 etc/lpd.perms.sample
-etc/lprng.sh
-etc/printcap.sample
+etc/lpd/lpd.conf.sample
+etc/lpd/lpd.perms.sample
+etc/lpd/lprng.sh.sample
+etc/lpd/printcap.sample
 lib/liblpr.a
-lib/liblpr.so.0
-lib/liblpr.so
 libexec/filters/lpbanner
 libexec/filters/lpf
 libexec/filters/pclbanner
@@ -19,12 +23,46 @@
 sbin/lprng_certs
 sbin/lprng_index_certs
 %%PORTDOCS%%%%DOCSDIR%%/LISA98.ppt
-%%PORTDOCS%%%%DOCSDIR%%/LPRng-HOWTO.html
-%%PORTDOCS%%%%DOCSDIR%%/LPRng-HOWTO.pdf
+%%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%%
+ at dirrm %%PORTDOCS%%%%DOCSDIR%%/Reference
+ at dirrm %%PORTDOCS%%%%DOCSDIR%%/PrintingCookbook
+ at dirrm %%PORTDOCS%%%%DOCSDIR%%
+ at dirrm libexec/filters
+ at dirrm etc/lpd
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list