tech-pkg archive

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

Re: R packages user-destdir support



Slightly updated; use INSTALLATION_DIRS instead of hard-coded mkdir.

Masao

Index: math/R/Makefile.extension
===================================================================
RCS file: /src/netbsd/cvsroot/pkgsrc/math/R/Makefile.extension,v
retrieving revision 1.11
diff -u -d -r1.11 Makefile.extension
--- math/R/Makefile.extension   14 Mar 2007 11:50:33 -0000      1.11
+++ math/R/Makefile.extension   9 Oct 2008 02:36:59 -0000
@@ -14,24 +14,27 @@
 DIST_SUBDIR?=          R
 CATEGORIES+=           math
 
-R_HOMEPAGE_BASE=       http://cran.r-project.org/src/contrib/Descriptions
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+PKG_DESTDIR_SUPPORT=   user-destdir
 
 WRKSRC=                ${WRKDIR}/${R_PKGNAME}
 
+INSTALLATION_DIRS=     ${R_LIB}
+
 do-build:
 
 do-install:
        R_LIBS= ${LOCALBASE}/bin/R CMD INSTALL ${R_PKG_INSTALL_ARGS} 
${WRKDIR}/${R_PKGNAME}
 
-# automatically generate the PLIST
 R_LIB=                 lib/R/library
 R_INST_DIRS?=          ${R_PKGNAME}
+R_HOMEPAGE_BASE=       http://cran.r-project.org/src/contrib/Descriptions
+R_PKG_INSTALL_ARGS=    -l ${DESTDIR}${PREFIX}/${R_LIB}
 
-R_PACKLIST_FILES_CMD=  ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \
+R_PACKLIST_FILES_CMD=  ( cd ${DESTDIR}${PREFIX}; for dir in ${R_INST_DIRS}; do 
\
        ${FIND} ${R_LIB}/$${dir} \( -type f -o -type l \) -print; done ) | 
${SORT} -u
-R_PACKLIST_DIRS_CMD=   ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \
+R_PACKLIST_DIRS_CMD=   ( cd ${DESTDIR}${PREFIX}; for dir in ${R_INST_DIRS}; do 
\
        ${FIND} ${R_LIB}/$${dir} -type d -print; done ) | ${SORT} -ur | ${SED} 
-e "s|^|@dirrm |"
-
 R_GENERATE_PLIST=      ${R_PACKLIST_FILES_CMD}; \
                        ${R_PACKLIST_DIRS_CMD};
 GENERATE_PLIST+=       ${R_GENERATE_PLIST}


Home | Main Index | Thread Index | Old Index