tech-pkg archive

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

R packages user-destdir support



This makes R packages install files into .destdir, kind of.  I have
not figured out why packages are not registered into pkgdb yet.

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 01:42:58 -0000
@@ -14,22 +14,27 @@
 DIST_SUBDIR?=          R
 CATEGORIES+=           math
 
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 R_HOMEPAGE_BASE=       http://cran.r-project.org/src/contrib/Descriptions
+R_PKG_INSTALL_ARGS=    -l ${DESTDIR}${PREFIX}/${R_LIB}
 
 WRKSRC=                ${WRKDIR}/${R_PKGNAME}
 
 do-build:
 
 do-install:
+       mkdir -p ${DESTDIR}${PREFIX}/${R_LIB}
        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_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}; \


Home | Main Index | Thread Index | Old Index