From f7fbbf5cd5cd6547001f48f9bfe3bc53f5303efe Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Wed, 27 Mar 2013 12:19:15 +0100 Subject: [PATCH] buildtypes: Add support for R packages use BEE_BUILDTYPE=r-package to build r packages. r packages are currently not detected automatically --- Makefile | 1 + buildtypes/r-package.sh.in | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 buildtypes/r-package.sh.in diff --git a/Makefile b/Makefile index d05e8cb..3875459 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,7 @@ BUILDTYPES+=make BUILDTYPES+=perl-module BUILDTYPES+=perl-module-makemaker BUILDTYPES+=python-module +BUILDTYPES+=r-package HELPER_HOOKS_SHELL+=update-mime-database HELPER_HOOKS_SHELL+=glib-compile-schemas diff --git a/buildtypes/r-package.sh.in b/buildtypes/r-package.sh.in new file mode 100644 index 0000000..df9ad0e --- /dev/null +++ b/buildtypes/r-package.sh.in @@ -0,0 +1,44 @@ +# +# +# bee magic for python modules +# +# Copyright (C) 2009-2012 +# Marius Tolzmann +# Tobias Dreyer +# and other bee developers +# +# This file is part of bee. +# +# bee is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# this needs to be forced for now +if [ ${BEE_BUILDTYPE} != "r-package" ] ; then + return +fi + +BEE_BUILDTYPE_DETECTED="r-package" + +: ${R:=R} + +RHOME=$(${R} RHOME) + +RLIBRARY="${RHOME}/library" + +#### bee_install() ############################################################ + +bee_install() { + start_cmd mkdir -p ${D}/${RLIBRARY} + start_cmd ${R} CMD INSTALL -l ${D}/${RLIBRARY} ${S} +}