summaryrefslogtreecommitdiffstats
path: root/builddebs.sh
blob: 36031e4dd61de84641d9421dc97c569547504d68 (plain)
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
48
49
50
51
#!/bin/bash

set -e

basedir=~/debian-base

vers=$1
debsubver=$2
dists=$3

[ -z "$debsubver" ] && debsubver="1"

[ -z "$vers" ] && [ -e .last_release ] && vers=`cat .last_release`
[ -z "$vers" ] && echo specify version && exit 1

echo version $vers

#./pull.sh $vers gz dsc

[ -z "$dists" ] && dists="sid squeeze lenny"

for dist in $dists
do
    pbuilder --clean

    dvers="$vers-$debsubver"
    [ "$dist" = "squeeze" ] && dvers="$dvers~bpo60+1"
    [ "$dist" = "lenny" ] && dvers="$dvers~bpo50+1"
    echo debian vers $dvers

    echo building debs for $dist
    pbuilder build \
	--binary-arch \
	--basetgz $basedir/$dist.tgz --distribution $dist \
	--buildresult release/$vers \
	--debbuildopts -j`grep -c processor /proc/cpuinfo` \
	release/$vers/ceph_$dvers.dsc
    
done


# do lintian checks
for dist in $dists
do
    dvers="$vers-$debsubver"
    [ "$dist" = "squeeze" ] && dvers="$dvers~bpo60+1"
    [ "$dist" = "lenny" ] && dvers="$dvers~bpo50+1"
    echo lintian checks for $dvers
    lintian --allow-root release/$vers/*$dvers*.deb
done