From 5f27b05342292e3bfe6415ae5df9ef9fc46ec1cb Mon Sep 17 00:00:00 2001 From: ranke Date: Thu, 21 Dec 2006 14:12:49 +0000 Subject: Added the possibility to backport R 2.4.1 to sarge with the backport from CRAN (2.4.0-0sarge2) installed git-svn-id: svn+ssh://stiller/home/schatz/reps/r-backports@6 f247ebf9-aa24-0410-a698-f940e971ad2b --- backport_r-base.sh | 17 --------------- backport_recommended.sh | 17 --------------- backport_recommended_etch.sh | 17 +++++++++++++++ backport_recommended_sarge.sh | 21 ++++++++++++++++++ edit_changelog.py | 28 ------------------------ edit_changelog_etch.py | 28 ++++++++++++++++++++++++ edit_changelog_sarge.py | 28 ++++++++++++++++++++++++ r-cran.mk.orig | 47 +++++++++++++++++++++++++++++++++++++++ r-sarge-cran-recommended.mk | 51 +++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 192 insertions(+), 62 deletions(-) delete mode 100644 backport_r-base.sh delete mode 100644 backport_recommended.sh create mode 100644 backport_recommended_etch.sh create mode 100644 backport_recommended_sarge.sh delete mode 100644 edit_changelog.py create mode 100644 edit_changelog_etch.py create mode 100644 edit_changelog_sarge.py create mode 100755 r-cran.mk.orig create mode 100755 r-sarge-cran-recommended.mk diff --git a/backport_r-base.sh b/backport_r-base.sh deleted file mode 100644 index 3ee8187..0000000 --- a/backport_r-base.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# SVN: $Id$ -# Script to automate building backports from Dirks r-base packages to etch. -# Depends: python-debian, edit_changelog.py -# Author: Johannes Ranke -# Comment: Doesn't currently work, since debian_bundle.changelog from -# python-debian throws an error with the changelog in r-base (message -# to pkg-python-debian-discuss on December 16 2006) -# Last Change: 2006 Dez 20 - -cd r-base -rm -rf * -apt-get source -t unstable r-base -cd r-base-* -python ../../edit_changelog.py -fakeroot dpkg-buildpackage -cd ../.. diff --git a/backport_recommended.sh b/backport_recommended.sh deleted file mode 100644 index d24ebad..0000000 --- a/backport_recommended.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# SVN: $Id$ -# Script to automate building backports from Dirks r-cran-* packages to etch. -# Depends: python-debian, edit_changelog.py -# Author: Johannes Ranke -# Comment: First, a backport of R should be installed -# Last Change: 2006 Dez 20 - -for i in boot cluster foreign kernsmooth lattice mgcv nlme rpart survival vr; do - cd $i - rm -rf * - apt-get source -t unstable r-cran-$i - cd $i-* - python ../../edit_changelog.py - fakeroot dpkg-buildpackage - cd ../.. -done diff --git a/backport_recommended_etch.sh b/backport_recommended_etch.sh new file mode 100644 index 0000000..d24ebad --- /dev/null +++ b/backport_recommended_etch.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# SVN: $Id$ +# Script to automate building backports from Dirks r-cran-* packages to etch. +# Depends: python-debian, edit_changelog.py +# Author: Johannes Ranke +# Comment: First, a backport of R should be installed +# Last Change: 2006 Dez 20 + +for i in boot cluster foreign kernsmooth lattice mgcv nlme rpart survival vr; do + cd $i + rm -rf * + apt-get source -t unstable r-cran-$i + cd $i-* + python ../../edit_changelog.py + fakeroot dpkg-buildpackage + cd ../.. +done diff --git a/backport_recommended_sarge.sh b/backport_recommended_sarge.sh new file mode 100644 index 0000000..0ed5afa --- /dev/null +++ b/backport_recommended_sarge.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# SVN: $Id$ +# Script to automate building backports from Dirks r-cran-* packages to etch. +# Depends: debian_bundle, edit_changelog.py +# Author: Johannes Ranke +# Comments: First, the backport 2.4.0-0sarge2 from CRAN should be installed +# debian/changelog and debian/control have to be hand-edited +# for nlme and rpart, replacing their build dependency on +# r-cran-survival by r-recommended (=2.4.0-0sarge2) +# Last Change: 2006 Dez 21 + +for i in boot cluster foreign kernsmooth lattice mgcv nlme rpart survival vr; do + cd $i + rm -rf $i* + apt-get source -t unstable r-cran-$i + cd $i-* + cp ../../r-sarge-cran-recommended.mk debian/rules + python ../../edit_changelog_sarge.py + fakeroot dpkg-buildpackage + cd ../.. +done diff --git a/edit_changelog.py b/edit_changelog.py deleted file mode 100644 index 34bf950..0000000 --- a/edit_changelog.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/python -# SVN: $Id$ -# Author: Johannes Ranke -# Last Change: 2006 Dez 20 - -from time import strftime -from debian_bundle.changelog import Changelog, Version - -author = 'Johannes Ranke ' - -chlg = "debian/changelog" -content = file(chlg).read() -changelog = Changelog(content) -newVersion = changelog.upstream_version() + "-" + changelog.debian_version() + "~cran.1" - -changelog.new_block(package=changelog.package(), - version=Version(newVersion), - distributions='etch-cran', - urgency='low', - author=author, - date=strftime("%a, %e %b %Y %H:%M:%S %z"), - ) - -changelog.add_change(''); -changelog.add_change(' * Backport to etch for repository on CRAN'); -changelog.add_change(''); - -file(chlg,"w").write(str(changelog)) diff --git a/edit_changelog_etch.py b/edit_changelog_etch.py new file mode 100644 index 0000000..61cf371 --- /dev/null +++ b/edit_changelog_etch.py @@ -0,0 +1,28 @@ +#!/usr/bin/python +# SVN: $Id: edit_changelog.py 5 2006-12-20 14:08:52Z ranke $ +# Author: Johannes Ranke +# Last Change: 2006 Dez 20 + +from time import strftime +from debian_bundle.changelog import Changelog, Version + +author = 'Johannes Ranke ' + +chlg = "debian/changelog" +content = file(chlg).read() +changelog = Changelog(content) +newVersion = changelog.upstream_version() + "-" + changelog.debian_version() + "~cran.1" + +changelog.new_block(package=changelog.package(), + version=Version(newVersion), + distributions='etch-cran', + urgency='low', + author=author, + date=strftime("%a, %e %b %Y %H:%M:%S %z"), + ) + +changelog.add_change(''); +changelog.add_change(' * Backport to etch for repository on CRAN'); +changelog.add_change(''); + +file(chlg,"w").write(str(changelog)) diff --git a/edit_changelog_sarge.py b/edit_changelog_sarge.py new file mode 100644 index 0000000..56bef13 --- /dev/null +++ b/edit_changelog_sarge.py @@ -0,0 +1,28 @@ +#!/usr/bin/python +# SVN: $Id: edit_changelog.py 5 2006-12-20 14:08:52Z ranke $ +# Author: Johannes Ranke +# Last Change: 2006 Dez 21 + +from time import strftime +from debian_bundle.changelog import Changelog, Version + +author = 'Johannes Ranke ' + +chlg = "debian/changelog" +content = file(chlg).read() +changelog = Changelog(content) +newVersion = changelog.upstream_version() + "-" + changelog.debian_version() + "~sargecran.1" + +changelog.new_block(package=changelog.package(), + version=Version(newVersion), + distributions='sarge-cran', + urgency='low', + author=author, + date=strftime("%a, %e %b %Y %H:%M:%S %z"), + ) + +changelog.add_change(''); +changelog.add_change(' * Backport to sarge for repository on CRAN'); +changelog.add_change(''); + +file(chlg,"w").write(str(changelog)) diff --git a/r-cran.mk.orig b/r-cran.mk.orig new file mode 100755 index 0000000..8fca38d --- /dev/null +++ b/r-cran.mk.orig @@ -0,0 +1,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 + +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 diff --git a/r-sarge-cran-recommended.mk b/r-sarge-cran-recommended.mk new file mode 100755 index 0000000..6cae6d9 --- /dev/null +++ b/r-sarge-cran-recommended.mk @@ -0,0 +1,51 @@ +#!/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 +# Changed by: Johannes Ranke +# Changed debRlib to correct value for recommended packages +# Last Change: 2006 Dez 21 + +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 +## jranke: for recommended packages +debRlib := $(CURDIR)/debian/$(package)/usr/lib/R/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 -- cgit v1.2.1