Bug#842092: dh-r: Please provide variables known from cdbs helper for R packages

2016-10-25 Thread Andreas Tille
Hi,

I worked around the missing variables in the r-bioc-biocparallel
code by adding

debRreposname   := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}' | 
sed 's/r-\([a-z]\+\)-.*/\1/')
awkString   := "'/^(Package|Bundle):/ {print $$2 }'"
cranNameOrig:= $(shell awk "$(awkString)" DESCRIPTION)
cranName:= $(shell echo "$(cranNameOrig)" | tr A-Z a-z)
package := r-$(debRreposname)-$(cranName)
debRdir := usr/lib/R/site-library
debRlib := $(CURDIR)/debian/$(package)/$(debRdir)

to debian/rules.  Please note that the calculation of debRreposname
would be an enhancement over r-cran.mk since formerly you needed to
specify debRreposname if it was different from the default cran.

Please also note that I skipped some "if-else" statements to simplify
things - it would be safer to copy the code from r-cran.mk (and add
debRreposname code if you agree that this is more elegant).

BTW, I could even imagine that this kind of dh_fixperms becomes
unneeded at all since it makes probably sense to chmod -x all *.R
files in the package.  What do you think?

Kind regards

   Andreas.

-- 
http://fam-tille.de



Bug#842092: dh-r: Please provide variables known from cdbs helper for R packages

2016-10-25 Thread Andreas Tille
Package: dh-r
Severity: wishlist

Hi,

I'm starting to convert some of my R packages from cdbs helper to dh-r.
When converting r-bioc-biocparallel I wanted to turn the code to fix the
permissions of a file into

override_dh_fixperms:
dh_fixperms
chmod -x $(debRlib)/$(cranNameOrig)/snow/RMPInode.R

Unfortunately the variables known from cdbs helper do not exist in dh-r.
I think it would increase the acceptance of dh-r if these would be
available and could be used in the manner above.

Kind regards and thanks for the great dh-r tool

 Andreas.


-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)