2007-03-14 12:50:17 +01:00
|
|
|
# $NetBSD: Makefile.extension,v 1.11 2007/03/14 11:50:33 markd Exp $
|
2002-04-23 03:14:49 +02:00
|
|
|
#
|
|
|
|
# This Makefile fragment is included by packages for R library packages.
|
|
|
|
#
|
|
|
|
# To use this Makefile fragment, simply:
|
|
|
|
#
|
|
|
|
# (1) define R_PKGNAME and R_PKGVER to the R package name and version
|
|
|
|
# for the package desired.
|
|
|
|
# (2) Include this Makefile fragment in the package Makefile,
|
|
|
|
|
|
|
|
DISTNAME?= ${R_PKGNAME}_${R_PKGVER}
|
|
|
|
PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./}
|
|
|
|
MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/}
|
|
|
|
DIST_SUBDIR?= R
|
|
|
|
CATEGORIES+= math
|
|
|
|
|
2005-11-03 13:00:32 +01:00
|
|
|
R_HOMEPAGE_BASE= http://cran.r-project.org/src/contrib/Descriptions
|
|
|
|
|
2007-02-22 20:26:05 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${R_PKGNAME}
|
2006-07-02 14:52:43 +02:00
|
|
|
|
|
|
|
do-build:
|
2002-04-23 03:14:49 +02:00
|
|
|
|
|
|
|
do-install:
|
2006-07-02 14:52:43 +02:00
|
|
|
R_LIBS= ${LOCALBASE}/bin/R CMD INSTALL ${R_PKG_INSTALL_ARGS} ${WRKDIR}/${R_PKGNAME}
|
2002-04-23 03:14:49 +02:00
|
|
|
|
|
|
|
# automatically generate the PLIST
|
|
|
|
R_LIB= lib/R/library
|
|
|
|
R_INST_DIRS?= ${R_PKGNAME}
|
|
|
|
|
2006-06-09 13:15:32 +02:00
|
|
|
R_PACKLIST_FILES_CMD= ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \
|
2002-09-23 15:41:15 +02:00
|
|
|
${FIND} ${R_LIB}/$${dir} \( -type f -o -type l \) -print; done ) | ${SORT} -u
|
2006-06-09 13:15:32 +02:00
|
|
|
R_PACKLIST_DIRS_CMD= ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \
|
2002-04-23 03:14:49 +02:00
|
|
|
${FIND} ${R_LIB}/$${dir} -type d -print; done ) | ${SORT} -ur | ${SED} -e "s|^|@dirrm |"
|
2006-06-09 13:15:32 +02:00
|
|
|
|
|
|
|
R_GENERATE_PLIST= ${R_PACKLIST_FILES_CMD}; \
|
2007-03-14 12:50:17 +01:00
|
|
|
${R_PACKLIST_DIRS_CMD};
|
2006-06-09 13:15:32 +02:00
|
|
|
GENERATE_PLIST+= ${R_GENERATE_PLIST}
|
2006-07-02 14:52:43 +02:00
|
|
|
|
2007-03-14 12:50:17 +01:00
|
|
|
INSTALL_TEMPLATES+= ../../math/R/files/pkg-index.tmpl
|
|
|
|
DEINSTALL_TEMPLATES+= ../../math/R/files/pkg-index.tmpl
|
|
|
|
|
2006-07-02 14:52:43 +02:00
|
|
|
.include "../../math/R/buildlink3.mk"
|