pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39456: DESTDIR support for pkgtools/pkgclean

>Number:         39456
>Category:       pkg
>Synopsis:       pkgtools/pkgclean: doesn't support DESTDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 03 20:35:00 +0000 2008
>Originator:     Leonardo Taccari
>Release:        NetBSD 4.0
NetBSD Italia
System: NetBSD bianconiglio 4.0 NetBSD 4.0 (BIANCONIGLIO) #3: Tue Jul 1 
06:54:05 CEST 2008 
Architecture: i386
Machine: i386
pkgtools/pkgclean doesn't support DESTDIR and has got various typos that could
be fixed with the help of pkglint(1).

pkglint(1) reports two warnings: the first about the @${CP}, that could be
fixed with the cleaner ${RUN} (special thanks to Aleksej Saushev for
this tip) and the second about the alignement of SUBST_CLASSES with spaces.
        For the DESTDIR support:
                $ cd ${PKGSRCDIR}/pkgtools/pkgclean
                $ USE_DESTDIR=full make install

        For the pkglint(1) warnings:
                $ cd ${PKGSRCDIR}/pkgtools/pkgclean
                $ pkglint -Wall
        Please apply this simple patch. Thanks a lot!

Index: Makefile
RCS file: /cvsroot/pkgsrc/pkgtools/pkgclean/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile    18 May 2007 10:03:31 -0000      1.13
+++ Makefile    3 Sep 2008 20:04:25 -0000
@@ -8,6 +8,7 @@ DISTFILES=      # empty
 COMMENT=       Quickly clean up all work directories in pkgsrc
+PKG_DESTDIR_SUPPORT=   user-destdir
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
@@ -17,13 +18,13 @@ NO_BUILD=   yes
-       @${CP} -R ${FILESDIR} ${WRKSRC}
+       ${RUN} ${CP} -R ${FILESDIR} ${WRKSRC}
-       ${INSTALL_SCRIPT} ${WRKSRC}/ ${PREFIX}/bin/pkgclean
-       ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 
+       ${INSTALL_SCRIPT} ${WRKSRC}/ ${DESTDIR}${PREFIX}/bin/pkgclean
+       ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 
-SUBST_CLASSES+=          path
+SUBST_CLASSES+=                path
 SUBST_STAGE.path=      post-patch
 SUBST_FILES.path= pkgclean.1
 SUBST_SED.path+=       -e 's,@SH@,${SH},g'


Home | Main Index | Thread Index | Old Index