tech-pkg archive

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

Re: Packages without DESTDIR support



> Hi all,
> http://www.netbsd.org/~joerg/missing-destdir
> has a list of all packages that currently lack DESTDIR support.
> Please help with reducing that less as far as possible.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/chat/tkabber/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile    12 Sep 2009 20:51:06 -0000      1.3
+++ Makefile    10 Dec 2009 19:37:48 -0000
@@ -20,7 +20,9 @@
 DATADIR=       ${PREFIX}/share/tkabber
 DOCDIR=                ${PREFIX}/share/doc/tkabber
 
-INSTALLATION_DIRS+=    ${EGDIR} ${DATADIR} ${DOCDIR}
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+AUTO_MKDIRS=           yes
 
 # XXX this is also in the tkabber's Makefile
 SUBDIRS=       emoticons \
@@ -36,17 +38,17 @@
 EXTRA_FILES=   AUTHORS README COPYING INSTALL ChangeLog
 
 do-install:
-       ${INSTALL_DATA} ${WRKSRC}/*.tcl ${DATADIR} #${WRKSRC}/*.xrdb ${DATADIR}
-       cd ${WRKSRC} && ${INSTALL_DATA} ${EXTRA_FILES} ${DOCDIR}
-       cd ${WRKSRC}/examples && pax -rw -pm . ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/*.tcl ${DESTDIR}${DATADIR} #${WRKSRC}/*.xrdb 
${DATADIR}
+       cd ${WRKSRC} && ${INSTALL_DATA} ${EXTRA_FILES} ${DESTDIR}${DOCDIR}
+       cd ${WRKSRC}/examples && pax -rw -pm . ${DESTDIR}${EGDIR}
 .for i in ${SUBDIRS}
-       cd ${WRKSRC} && pax -rw -pm ${i} ${DATADIR}
+       cd ${WRKSRC} && pax -rw -pm ${i} ${DESTDIR}${DATADIR}
 .endfor
        # TODO This must be a CLASS
        ${SED} -e "s,@WISH@,${WISH}," \
                -e "s,@DATADIR@,${DATADIR}," ${FILESDIR}/tkabber.sh \
                > ${WRKSRC}/tkabber
-       ${INSTALL_SCRIPT} ${WRKSRC}/tkabber ${PREFIX}/bin
+       ${INSTALL_SCRIPT} ${WRKSRC}/tkabber ${DESTDIR}${PREFIX}/bin
 
 .include "../../x11/tk-BWidget/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"


-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index