Subject: pkg/22905: Clean up install target for sysutils/tdir
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/23/2003 09:01:08
>Number:         22905
>Category:       pkg
>Synopsis:       Clean up install target for sysutils/tdir
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 23 09:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
tdir's install target is insufficient for some pkgsrc platforms, and
doesn't support pkgsrc's manual page handling.  The manual page is
also missing from the PLIST.

The patch below fixes the usuall install(1) problems, as well as letting
pkgsrc decide whether the manual page should be compressed or not, and
adding it to the PLIST.
>How-To-Repeat:
===> Installing for tdir-1.58
install -c -o root -g wheel -m 755 ./tdir /home/jonp/bulk/pkg/bin
install: The -c, -f, -n options each require a directory following!
*** Error code 2
>Fix:
http://www.perkin.org.uk/projects/netbsd/tdir.diff

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/tdir/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	2003/07/17 22:53:54	1.6
+++ Makefile	2003/09/23 08:54:14
@@ -12,5 +12,12 @@
 
 PYTHON_PATCH_SCRIPTS=	tdir
 
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/tdir ${PREFIX}/bin/tdir
+	${GUNZIP_CMD} ${WRKSRC}/tdir.1.gz
+	${INSTALL_MAN} ${WRKSRC}/tdir.1 ${PREFIX}/man/man1/tdir.1
+	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/tdir
+	${INSTALL_DATA} ${WRKSRC}/tdir-license.txt ${PREFIX}/share/doc/tdir/
+
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/tdir/PLIST,v
retrieving revision 1.1
diff -u -r1.1 PLIST
--- PLIST	2001/10/31 22:53:56	1.1
+++ PLIST	2003/09/23 08:54:14
@@ -1,4 +1,5 @@
 @comment $NetBSD: PLIST,v 1.1 2001/10/31 22:53:56 zuntum Exp $
 bin/tdir
+man/man1/tdir.1
 share/doc/tdir/tdir-license.txt
 @dirrm share/doc/tdir
>Release-Note:
>Audit-Trail:
>Unformatted: