/usr/share/R/debian/r-cran.mk is in r-base-dev 3.0.2-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | #!/usr/bin/make -f
# -*- makefile -*-
#
# Generic debian/rules file for the Debian/GNU Linux r-cran-* packages
#
# Should be sufficient for Debianization of CRAN (http://cran.r-project.org)
# packages. Note that you still need to provide the other files in debian/*,
# in particular control, changelog and copyright.
#
# Copyright 2003-2013 by Dirk Eddelbuettel <edd@debian.org>
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk
## include /usr/share/cdbs/1/rules/dpatch.mk
## include /usr/share/cdbs/1/rules/simple-patchsys.mk
# Check whether source format 3.0 (quilt) is used. If yes, do not include the conflicting simple-patchsys.mk
formatfile := $(CURDIR)/debian/source/format
format_3_quilt = $(shell if [ -f $(formatfile) ] ; then if grep -q '3.0[[:space:]]*(quilt)' $(formatfile) ; then echo 1 ; else echo 0 ; fi else echo 0 ; fi )
ifeq ($(format_3_quilt),0)
include /usr/share/cdbs/1/rules/simple-patchsys.mk
endif
# awk command to extract word after Package or Bundle, not lowercased
awkString := "'/^(Package|Bundle):/ {print $$2 }'"
# apply it to the upstream meta-info file DESCRIPTION, also generate a lc version
cranNameOrig := $(shell awk "$(awkString)" DESCRIPTION)
#cranName := $(shell echo "$(cranNameOrig)" | tr A-Z a-z | tr . -)
cranName := $(shell echo "$(cranNameOrig)" | tr A-Z a-z)
## if no debRreposname is known, set default to cran -- thanks, Steffen!
ifeq ($(debRreposname),)
debRreposname := cran
endif
## we can define additional flags for R's make, eg "CXXFLAGS=-g0" for
## RQuantLib but the default is empty
## makeFlags :=
## if makeFlags are defined, then we'll use them in this variable
## which would otherwise be empty
ifneq ($(makeFlags),)
makeFlagsCall := MAKEFLAGS=$(makeFlags)
endif
## and use the results to build the Debian'ized package name
package := r-$(debRreposname)-$(cranName)
## awk command to extract word after Priority
prioritystr := "'/^Priority:/ {print tolower($$2) }'"
priority := $(shell awk "$(prioritystr)" DESCRIPTION)
ifeq ($(priority),recommended)
debRdir := usr/lib/R/library
else
debRdir := usr/lib/R/site-library
endif
## current R version in Debian, with thanks to Charles Plessy for the dpkg-query call
#rversion := $(shell zcat /usr/share/doc/r-base-dev/changelog.Debian.gz | \
# dpkg-parsechangelog -l- --count 1 | \
# awk '/^Version/ {print $$2}')
rversion := $(shell dpkg-query -W -f='$${Version}' r-base-dev)
## we use these results for the to-be-installed-in directory
debRlib := $(CURDIR)/debian/$(package)/$(debRdir)
## optional installation of a lintian silencer
lintiandir := $(CURDIR)/debian/$(package)/usr/share/lintian/overrides
common-install-indep:: R_any_arch
common-install-arch:: R_any_arch
R_any_arch:
## create the target directory
dh_installdirs $(debRdir)
##
## support ${R:Depends} via debian/${package}.substvars
echo "R:Depends=r-base-core (>= ${rversion})" >> debian/$(package).substvars
##
## call R to install the sources we're looking at
## use this inside xvfb-run if this wrapper is installed
if test -f /usr/bin/xvfb-run; then \
$(makeFlagsCall) xvfb-run -a \
R CMD INSTALL -l $(debRlib) --clean \
$(extraInstallFlags) . ; \
else \
$(makeFlagsCall) R CMD INSTALL -l $(debRlib) \
--clean $(extraInstallFlags) . ;\
fi
## remove extra files which are present in some packages
rm -vf $(debRlib)/R.css \
$(debRlib)/$(cranNameOrig)/COPYING \
$(debRlib)/$(cranNameOrig)/LICENSE.txt
## if we have an overrides file for lintian, install it
if test -f debian/overrides; then \
install -d $(lintiandir) ; \
install -m 0644 debian/overrides \
$(lintiandir)/$(package); \
fi
## clean target from patch by Steffen Moeller on 16 May 2009
clean::
## the re-invocation of a build process should not
## leave a footprint in Debian's diff.gz.
if test -d src; then \
find src -regex ".*\.o" | \
xargs --no-run-if-empty -r rm; \
fi
rm -f config.log config.status
## the configure file is provided by upstream but
## could be recreated by a call to 'autoconf'.
#if [ -r configure.in ]; then \
# rm -f configure \
#fi
##
# if [ -r src/Makevars.in ]; then \
# rm -f src/Makevars; \
# fi
|