Subject: pkg/18991: Make print/psutils honor PKG_SYSCONFDIR (plus fixes)
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@menta.net>
List: netbsd-bugs
Date: 11/09/2002 11:02:08
>Number:         18991
>Category:       pkg
>Synopsis:       Make print/psutils honor PKG_SYSCONFDIR (plus fixes)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 09 01:58:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6K
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6K NetBSD 1.6K (DARKSTAR) #130: Thu Nov 7 23:22:44 CET 2002 jmmv@darkstar.local:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	The package print/psutils currently installs a configuration file
	directly inside ${PREFIX}/etc. This file should be managed with
	PKG_SYSCONFDIR stuff instead.

	The other problem is that the psutils.cfg file is not even
	registered by the PLIST.

	The attached patch also adds a HOMEPAGE to the package, to shut up
	pkglint.
>How-To-Repeat:
	
>Fix:
	Apply this patch:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/psutils/Makefile,v
retrieving revision 1.20
diff -u -u -r1.20 Makefile
--- Makefile	2001/09/27 23:18:36	1.20
+++ Makefile	2002/11/09 09:54:24
@@ -4,10 +4,12 @@
 
 DISTNAME=	psutils-p17
 PKGNAME=	psutils-1.17
+PKGREVISION=	1
 CATEGORIES=	print
 MASTER_SITES=	ftp://ftp.dcs.ed.ac.uk/pub/ajcd/
 
 MAINTAINER=	packages@netbsd.org
+HOMEPAGE=	http://www.go.dlr.de:8081/pdinfo_dv/psutils.html
 COMMENT=	Utilities for manipulating PostScript documents
 
 DEPENDS+=	papersize-[0-9]*:../../print/papersize
@@ -23,6 +25,9 @@
 MAKE_FLAGS+=	PAPER=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`
 MAKEFILE=	Makefile.unix
 
+EGDIR=		${PREFIX}/share/examples/psutils
+CONF_FILES=	${EGDIR}/psutils.cfg ${PKG_SYSCONFDIR}/psutils.cfg
+
 pre-configure:
 	@case "X${PAPERSIZE}" in					\
 	XA4|XLetter)							\
@@ -48,9 +53,9 @@
 	for f in epsffit psbook psnup psresize psselect pstops; do	\
 		strip ${PREFIX}/bin/$$f;				\
 	done
+	${INSTALL_DATA_DIR} ${EGDIR}
 	low=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`;		\
-	if [ ! -f ${PREFIX}/etc/psutils.cfg ]; then			\
-		${ECHO} "PAPERSIZE=$$low" > ${PREFIX}/etc/psutils.cfg;	\
-	fi
+	${ECHO} "PAPERSIZE=$$low" > ${EGDIR}/psutils.cfg;
 
+.include "../../mk/bsd.pkg.install.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/psutils/PLIST,v
retrieving revision 1.1
diff -u -u -r1.1 PLIST
--- PLIST	2001/10/31 23:28:00	1.1
+++ PLIST	2002/11/09 09:54:24
@@ -40,6 +40,8 @@
 man/man1/psresize.1.gz
 man/man1/psselect.1.gz
 man/man1/pstops.1.gz
+share/examples/psutils/psutils.cfg
 share/psutils/md68_0.ps
 share/psutils/md71_0.ps
+@dirrm share/examples/psutils
 @dirrm share/psutils


	Thank you!
>Release-Note:
>Audit-Trail:
>Unformatted: