summaryrefslogtreecommitdiff
path: root/backport_others.sh
blob: 78f650aab2acdda4bbba693632b1d5c113c289ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Author: Johannes Ranke <jranke@uni-bremen.de>

# Run with (requires sudo configuration on Debian)
# sudo -E ./backport_others.sh

# Preconditions: - shell variables DIST and ARCH
#                - pbuilder chroot set up (see README)
#                - 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)
#                - Set the R version

# R version against which the software is compiled
Rversion=3.1.2
reposversion="cran3"

echo Distribution is $DIST
echo Architecture is $ARCH

text="Recompiled on $DIST for CRAN"
rbasedev="r-base-dev (>= $Rversion~$DIST$reposversion.0)"

# Update the Package listings of the host system
apt-get update
# Update the pbuilder chroot
pbuilder update

# When doing a new repository, lattice, r-cran-mass and survival have to be
# built first, then nlme and rmatrix, then the rest

# single package:
#for i in rpy2; do
# squeeze/wheezy packages:
for i in lattice nlme rmatrix mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet r-cran-mass rodbc rpart survival littler rpy rpy2 rkward r-cran-rjags; 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

Contact - Imprint