# Author: Johannes Ranke # Run with (requires sudo configuration on Debian) # sudo -E ./backport_others.sh # Preconditions: - shell variables DIST and ARCH # - current R backport in /etc/apt/sources/list of pbuilder chroot # - sid sources in /etc/apt/sources/list # - ssed and cdbs installed (and maybe more) # - Edit R version and the sed scripts below (don't forget # distribution name) to the appropriate version of R # - Set the R version # R version against which the software is compiled Rversion=3.0.0 reposversion="cran3" echo Distribution is $DIST echo Architecture is $ARCH text="Recompiled on $DIST for CRAN" rbasedev="r-base-dev (>= $Rversion~$DIST$reposversion.0)" echo $rbasedev #apt-get update pbuilder update # single package: for i in boot; do # lenny packages: #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 # squeeze/wheezy packages: #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 rpy rkward; do apt-get source $i cd $i-* version=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`~$DIST"cran".$Rversion dch -b -v $version --force-distribution -D $DIST-$reposversion $text ssed -i -R "/^Build-Depends/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control ssed -i -R "/^Build-Depends-Indep/s/r-base-dev \(>= .*?\)/$rbasedev/" debian/control dch -a "debian/control: adapt build dependencies on r-base-dev to current backport" pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-$reposversion/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache --buildplace /var/cache/pbuilder/$DIST-$ARCH/build cd .. done