forked from treasure-data/td-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-deb.sh
executable file
·56 lines (48 loc) · 1.17 KB
/
make-deb.sh
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
52
53
54
55
56
#!/bin/bash
version=`cat VERSION`
password=`cat PASSWORD`
dst=td-agent-$version
rev=`cat REVISION`
rm -fR fluentd
git clone git://github.com/fluent/fluentd.git
cd fluentd
git checkout $rev
cd ..
rm -fR $dst*
rm -fR td-agent_$version*
rm -fR *.dsc
cp -r fluentd $dst
cp -r debian $dst
cp td-agent.conf $dst
cp td-agent.prelink.conf $dst
cp Makefile.am $dst
cp autogen.sh $dst
cp configure.in $dst
tar czf $dst.tar.gz $dst
pushd $dst
yes | dh_make -e [email protected] --single -f ../$dst.tar.gz
./autogen.sh
dpkg-buildpackage -rfakeroot -us -uc -S
popd
DISTS='lucid precise'
ARCHITECTURES='i386 amd64'
for dist in $DISTS; do
for arc in $ARCHITECTURES; do
echo $password | sudo -S ls
echo td-agent_$version-1.dsc
pbuilder-dist $dist $arc build td-agent_$version-1.dsc &
done
done
wait
for dist in $DISTS; do
for arc in $ARCHITECTURES; do
echo $password | sudo -S ls
mkdir -p $version/$dist
cp ~/pbuilder/$dist-${arc}_result/td-agent_$version-1_$arc.deb $version/$dist
done
done
cp td-agent_$version-1.dsc $version/
cp td-agent_$version-1.debian.tar.gz $version/
cp td-agent_$version.orig.tar.gz $version/
wait
tar czf $version.tar.gz $version