3
# debian/rules file for the Debian/GNU Linux r-cran-readbrukerflexdata package
4
# Copyright 2012 by Sebastian Gibb <sgibb.debian@gmail.com>
6
# Uncomment this to turn on verbose mode.
9
PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: *//p')
10
CRANVERSION ?= $(shell uscan --no-conf --dehs | sed -n 's/.*<upstream-version>\([0-9.]\+\)<\/upstream-version>.*/\1/p')
11
RVERSION := $(shell grep "Depends: R" DESCRIPTION | sed 's/.*(\([><= 0-9.]\+\)).*/\1/')
12
RLIB := usr/lib/R/site-library
19
sed "s/@R_DEPENDS_VERSION@/${RVERSION}/" debian/control.in > debian/control
21
override_dh_installchangelogs:
22
dh_installchangelogs NEWS
24
override_dh_auto_install:
25
## create target directory
26
dh_installdirs ${RLIB}
28
## use debian/${PACKAGE}.substvars to support debian/control ${R:Depends}
29
echo "R:Depends=r-base-core (${RVERSION})" >> debian/${PACKAGE}.substvars
32
R CMD INSTALL --library=${CURDIR}/debian/${PACKAGE}/${RLIB} --clean .
34
## remove LICENSE file
35
rm -rf ${CURDIR}/debian/${PACKAGE}/${RLIB}/*/LICENSE
38
## download newest ${PACKAGE} from CRAN
39
uscan --no-conf --force-download --no-symlink --destdir ../tarballs