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
>Organization:
NetBSD Italia
>Environment:
        
        
System: NetBSD bianconiglio 4.0 NetBSD 4.0 (BIANCONIGLIO) #3: Tue Jul 1 
06:54:05 CEST 2008 
leot@bianconiglio:/home/leot/builds/usr/src/sys/arch/i386/compile/BIANCONIGLIO 
i386
Architecture: i386
Machine: i386
>Description:
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.
>How-To-Repeat:
        For the DESTDIR support:
                $ cd ${PKGSRCDIR}/pkgtools/pkgclean
                $ USE_DESTDIR=full make install

        For the pkglint(1) warnings:
                $ cd ${PKGSRCDIR}/pkgtools/pkgclean
                $ pkglint -Wall
>Fix:
        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
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 COMMENT=       Quickly clean up all work directories in pkgsrc
 
+PKG_DESTDIR_SUPPORT=   user-destdir
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
 
 NO_CHECKSUM=   yes
@@ -17,13 +18,13 @@ NO_BUILD=   yes
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
 
 do-extract:
-       @${CP} -R ${FILESDIR} ${WRKSRC}
+       ${RUN} ${CP} -R ${FILESDIR} ${WRKSRC}
 
 do-install:
-       ${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${PREFIX}/bin/pkgclean
-       ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 
${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
+       ${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${DESTDIR}${PREFIX}/bin/pkgclean
+       ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
 
-SUBST_CLASSES+=          path
+SUBST_CLASSES+=                path
 SUBST_STAGE.path=      post-patch
 SUBST_FILES.path=      pkgclean.sh pkgclean.1
 SUBST_SED.path+=       -e 's,@SH@,${SH},g'

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index