Package: r-base-dev
Version: 2.9.0-2
Tags: patch

The very useful makefile /usr/share/R/debian/r-cran.mk has one small
snag that I've just hit: I have a package called eRm (note the
capitalisation) which installs a COPYING file.  The makefile cleverly
tries to delete it, but fails because $(cranName) is erm, but the file
is installed in site-library/eRm/COPYING.  Here's a suggested patch
for this.

--- /usr/share/R/debian/r-cran.mk       2009-05-11 01:02:57.000000000 +0100
+++ /tmp/r-cran.mk      2009-05-31 01:59:38.000000000 +0100
@@ -15,10 +15,11 @@
 include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
 # awk command to extract word after Package or Bundle, lowercased
-awkString      := "'/^(Package|Bundle):/ {print tolower($$2) }'"
+awkString      := "'/^(Package|Bundle):/ {print $$2 }'"
 
 # apply it to the upstream meta-info file DESCRIPTION
 cranName        := $(shell awk "$(awkString)" DESCRIPTION)
+cranNamelc      := $(shell echo "$(cranName)" | tr A-Z a-z)
 
 ## if no debRreposname is known, set default to cran -- thanks, Steffen!
 ifeq ($(debRreposname),)
@@ -35,7 +36,7 @@
 endif
 
 ## and use the results to build the Debian'ized package name
-package                := r-$(debRreposname)-$(cranName)
+package                := r-$(debRreposname)-$(cranNamelc)
 
 ## awk command to extract word after Priority
 prioritystr    := "'/^Priority:/ {print tolower($$2) }'"
@@ -73,7 +74,9 @@
                 ## remove extra files which are present in some packages
                rm -vf $(debRlib)/R.css                         \
                        $(debRlib)/$(cranName)/COPYING          \
-                       $(debRlib)/$(cranName)/LICENSE.txt
+                       $(debRlib)/$(cranName)/LICENSE.txt      \
+                       $(debRlib)/$(cranNamelc)/COPYING        \
+                       $(debRlib)/$(cranNamelc)/LICENSE.txt
                 ## if we have an overrides file for lintian, install it
                if test -f debian/overrides; then               \
                        install -d $(lintiandir) ;              \


   Julian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to