Subject: pkg/18981: Make net/wget honor PKG_SYSCONFDIR
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@menta.net>
List: netbsd-bugs
Date: 11/08/2002 22:47:20
>Number:         18981
>Category:       pkg
>Synopsis:       Make net/wget honor PKG_SYSCONFDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 08 13:43:01 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:
	Actually, net/wget installs its configuration file directly inside
	PREFIX/etc. This is wrong, as this file should be installed in
	PKG_SYSCONFDIR, using the mechanisms provided by bsd.pkg.install.mk.

	This should be fixed to install the configuration file in the
	examples directory and copy it to PKG_SYSCONFDIR.
>How-To-Repeat:
	
>Fix:

	Apply this patch (aside of fixing the problem, also added two ""
	to the COMMENT to avoid wrong colorization in vim... It's very
	annoying.)

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/wget/Makefile,v
retrieving revision 1.49
diff -u -u -r1.49 Makefile
--- Makefile	2002/09/18 19:51:55	1.49
+++ Makefile	2002/11/08 21:38:30
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.49 2002/09/18 19:51:55 tron Exp $
 
 DISTNAME=	wget-1.7
-PKGREVISION=	1
+PKGREVISION=	2
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_GNU:=wget/}
 
@@ -11,7 +11,7 @@
 
 MAINTAINER=	packages@netbsd.org
 HOMEPAGE=	http://www.gnu.org/software/wget/wget.html
-COMMENT=	Retrieve files from the 'net via HTTP and FTP
+COMMENT=	"Retrieve files from the 'net via HTTP and FTP"
 
 USE_PERL5=	build
 
@@ -21,7 +21,11 @@
 USE_GMAKE=	YES
 GNU_CONFIGURE=	YES
 MAKE_ENV+=	PKGLOCALEDIR="${PKGLOCALEDIR}"
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
 
+EGDIR=		${PREFIX}/share/examples/wget
+CONF_FILES=	${EGDIR}/wgetrc ${PKG_SYSCONFDIR}/wgetrc
+
 INFO_FILES=	wget.info
 
 BUILD_DEFS+=    USE_INET6
@@ -48,4 +52,5 @@
 .include "../../devel/gettext-lib/buildlink2.mk"
 
 .include "../../mk/texinfo.mk"
+.include "../../mk/bsd.pkg.install.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/wget/PLIST,v
retrieving revision 1.4
diff -u -u -r1.4 PLIST
--- PLIST	2002/03/30 13:57:02	1.4
+++ PLIST	2002/11/08 21:38:32
@@ -1,6 +1,5 @@
 @comment $NetBSD: PLIST,v 1.4 2002/03/30 13:57:02 pooka Exp $
 bin/wget
-etc/wgetrc
 man/man1/wget.1
 @unexec ${INSTALL_INFO} --delete %D/info/wget.info %D/info/dir
 info/wget.info
@@ -31,3 +30,5 @@
 ${PKGLOCALEDIR}/locale/tr/LC_MESSAGES/wget.mo
 ${PKGLOCALEDIR}/locale/zh/LC_MESSAGES/wget.mo
 ${PKGLOCALEDIR}/locale/zh_TW/LC_MESSAGES/wget.mo
+share/examples/wget/wgetrc
+@dirrm share/examples/wget
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/wget/distinfo,v
retrieving revision 1.12
diff -u -u -r1.12 distinfo
--- distinfo	2002/10/21 14:46:26	1.12
+++ distinfo	2002/11/08 21:38:32
@@ -10,3 +10,4 @@
 SHA1 (patch-ad) = 8994c291eb3e06c87a6c83dfc2b02fbf9f318c34
 SHA1 (patch-ae) = 1400b747cb0b2cd4311e566941cbc8ff3e59c76d
 SHA1 (patch-af) = 99947fe7a56611cd0c949ddd7736971e96627731
+SHA1 (patch-ag) = 76f6bee3384e99375ea1249bfd054f904d5b9750



	And now, import this new patch as patches/patch-ag:

$NetBSD$

--- doc/Makefile.in.orig	Thu Apr 12 14:25:22 2001
+++ doc/Makefile.in
@@ -40,6 +40,7 @@ prefix     = @prefix@
 infodir    = @infodir@
 mandir     = @mandir@
 manext     = 1
+datadir    = @datadir@
 sysconfdir = @sysconfdir@
 
 DESTDIR    =
@@ -51,7 +52,7 @@ RM = rm -f
 TEXI2POD     = ./texi2pod.pl
 POD2MAN      = @POD2MAN@
 MAN          = wget.$(manext)
-WGETRC       = $(sysconfdir)/wgetrc
+WGETRC       = $(datadir)/examples/@PACKAGE@/wgetrc
 SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
 
 #
@@ -119,7 +120,7 @@ install.man: $(MAN)
 
 # install sample.wgetrc
 install.wgetrc: $(srcdir)/sample.wgetrc
-	$(top_srcdir)/mkinstalldirs $(sysconfdir)
+	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/examples/@PACKAGE@
 	@if test -f $(WGETRC); then \
 	  if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
 	     else \
>Release-Note:
>Audit-Trail:
>Unformatted: