| 1 |
# Author: Johannes Ranke <jranke@uni-bremen.de> |
# Author: Johannes Ranke <jranke@uni-bremen.de> |
| 2 |
|
|
| 3 |
|
# On Debian I used to run this script as root. On Ubuntu I now run it with |
| 4 |
|
# sudo -E sh backport_others.sh |
| 5 |
|
|
| 6 |
# Preconditions: - shell variables DIST and ARCH |
# Preconditions: - shell variables DIST and ARCH |
| 7 |
# - sid sources in /etc/apt/sources/list |
# - sid sources in /etc/apt/sources/list |
| 8 |
|
# - ssed and cdbs installed (and maybe more) |
| 9 |
# - Edit the sed scripts below to adapt the build dependencies |
# - Edit the sed scripts below to adapt the build dependencies |
| 10 |
# to the appropriate version of r-base-dev |
# to the appropriate version of r-base-dev |
| 11 |
# - Set the R version |
# - Set the R version |
| 12 |
|
|
| 13 |
# R version against which the software is compiled |
# R version against which the software is compiled |
| 14 |
Rversion=2.9.2 |
Rversion=2.10.0 |
| 15 |
|
|
| 16 |
echo Distribution is $DIST |
echo Distribution is $DIST |
| 17 |
echo Architecture is $ARCH |
echo Architecture is $ARCH |
| 18 |
|
|
| 19 |
text="Recompiled on $DIST for CRAN" |
text="Recompiled on $DIST for CRAN" |
| 20 |
|
|
| 21 |
#apt-get update |
apt-get update |
| 22 |
#pbuilder update |
pbuilder update |
| 23 |
|
|
| 24 |
#for i in survival; do |
#for i in nlme; do |
| 25 |
for i in rpart survival vr littler; do |
#for i in boot cluster codetools foreign kernsmooth lattice mgcv nlme r-cran-class r-cran-spatial r-cran-nnet r-cran-mass rmatrix rodbc rpart survival littler; do |
|
#for i in boot cluster codetools foreign kernsmooth lattice mgcv nlme rmatrix rodbc rpart survival vr littler; do |
|
| 26 |
apt-get source -t unstable $i |
apt-get source -t unstable $i |
| 27 |
cd $i-* |
cd $i-* |
| 28 |
version=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`~$DIST"cran".$Rversion |
version=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`~$DIST"cran".$Rversion |
| 29 |
dch -b -v $version --force-distribution -D $DIST-cran $text |
dch -b -v $version --force-distribution -D $DIST-cran $text |
| 30 |
|
|
| 31 |
sed -i '/^Build-Depends/s/r-base-dev (>= 2\..\..)/r-base-dev (>= 2.9.2-1~etchcran.0)/' debian/control |
ssed -i -R '/^Build-Depends/s/r-base-dev \(>= 2\..*?\)/r-base-dev (>= 2.10.0-1~lennycran.0)/' debian/control |
| 32 |
sed -i '/^Build-Depends-Indep/s/r-base-dev (>= 2\..\..)/r-base-dev (>= 2.9.2-1~etchcran.0)/' debian/control |
ssed -i -R '/^Build-Depends-Indep/s/r-base-dev \(>= 2\..*?\)/r-base-dev (>= 2.10.0-1~lennycran.0)/' debian/control |
| 33 |
|
|
| 34 |
dch -a "debian/control: adapt build dependencies on r-base-dev to current backport" |
dch -a "debian/control: adapt build dependencies on r-base-dev to current backport" |
| 35 |
|
|
| 36 |
pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /exthd/pbuilder/$DIST-$ARCH/aptcache --buildplace /exthd/pbuilder/$DIST-$ARCH/build |
pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache --buildplace /var/cache/pbuilder/$DIST-$ARCH/build |
| 37 |
cd .. |
cd .. |
| 38 |
done |
done |