blob: 8fca38d1ff78521b31688106a7c2eaa77102e24a (
plain) (
blame)
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
|
#!/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-2006 by Dirk Eddelbuettel <edd@debian.org>
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk
# awk command to extract word after Package or Bundle, lowercased
awkString := "'/^(Package|Bundle):/ {print tolower($$2) }'"
# apply it to the upstream meta-info file DESCRIPTION
cranName := $(shell awk "$(awkString)" DESCRIPTION)
## and use the result to build the Debian'ized package name
package := r-cran-$(cranName)
## which we use for the to-be-installed-in directory
debRlib :=$(CURDIR)/debian/$(package)/usr/lib/R/site-library
## 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 usr/lib/R/site-library
## call R to install the sources we're looking at
R CMD INSTALL -l $(debRlib) --clean .
## remove extra files which are present in some packages
rm -vf $(debRlib)/R.css \
$(debRlib)/$(cranName)/COPYING \
$(debRlib)/$(cranName)/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
|