~ubuntu-branches/ubuntu/vivid/r-cran-readbrukerflexdata/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): The Debichem Group
  • Date: 2012-11-11 10:44:00 UTC
  • Revision ID: package-import@ubuntu.com-20121111104400-m8gacm82og5edgdj
Tags: 1.5-1
* Initial release by Sebastian Gibb <sgibb.debian@gmail.com> 
  (Closes: #693738).

* Uploaded by Filippo Rusconi <lopippo@debian.org>.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- makefile -*-
 
3
# debian/rules file for the Debian/GNU Linux r-cran-readbrukerflexdata package
 
4
# Copyright 2012 by Sebastian Gibb <sgibb.debian@gmail.com>
 
5
 
 
6
# Uncomment this to turn on verbose mode.
 
7
export DH_VERBOSE=1
 
8
 
 
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
 
13
 
 
14
%:
 
15
        dh $@ 
 
16
 
 
17
override_dh_clean:
 
18
        dh_clean
 
19
        sed "s/@R_DEPENDS_VERSION@/${RVERSION}/" debian/control.in > debian/control
 
20
 
 
21
override_dh_installchangelogs:
 
22
        dh_installchangelogs NEWS
 
23
 
 
24
override_dh_auto_install:
 
25
        ## create target directory
 
26
        dh_installdirs ${RLIB}
 
27
 
 
28
        ## use debian/${PACKAGE}.substvars to support debian/control ${R:Depends}
 
29
        echo "R:Depends=r-base-core (${RVERSION})" >> debian/${PACKAGE}.substvars
 
30
 
 
31
        ## install r package
 
32
        R CMD INSTALL --library=${CURDIR}/debian/${PACKAGE}/${RLIB} --clean .
 
33
 
 
34
        ## remove LICENSE file
 
35
        rm -rf ${CURDIR}/debian/${PACKAGE}/${RLIB}/*/LICENSE
 
36
 
 
37
get-orig-source:
 
38
        ## download newest ${PACKAGE} from CRAN
 
39
        uscan --no-conf --force-download --no-symlink --destdir ../tarballs
 
40