summaryrefslogblamecommitdiff
path: root/backport_others.sh
blob: ba2a1a1e6283804166fa5f5d97dd83a8ac5194d0 (plain) (tree)
1
2
3
4
5
6
7
8

                                               


                                                                           

                                                       
                                                           




                                                                             
               





                                   

               
 

                                                                                                                                                                  


                                                                                        
                                                               
 

                                                                                                                      


                                                                                       
                                                                                                                                                                                                                                                                                      

         
# Author: Johannes Ranke <jranke@uni-bremen.de>

# On Debian I used to run this script as root. On Ubuntu I now run it with 
# sudo -E sh backport_others.sh

# Preconditions: - shell variables DIST and ARCH
#                - sid sources in /etc/apt/sources/list
#                - ssed and cdbs installed (and maybe more)
#                - Edit the sed scripts below to adapt the build dependencies
#                  to the appropriate version of r-base-dev
#                - Set the R version

# R version against which the software is compiled
Rversion=2.10.0

echo Distribution is $DIST
echo Architecture is $ARCH

text="Recompiled on $DIST for CRAN"

apt-get update
pbuilder update

#for i in nlme; 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
    apt-get source -t unstable $i
    cd $i-*
    version=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`~$DIST"cran".$Rversion
    dch -b -v $version --force-distribution -D $DIST-cran $text

    ssed -i -R '/^Build-Depends/s/r-base-dev \(>= 2\..*?\)/r-base-dev (>= 2.10.0-1~lennycran.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

    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-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
    cd ..
done

Contact - Imprint