-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
69 lines (43 loc) · 1.63 KB
/
build.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
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
os=$1
flavor=$2
series=$3
version=$4
release=$5
branch=$6
mkdir ${os}-${flavor}-Glusterfs-${version}
cd ${os}-${flavor}-Glusterfs-${version}
mkdir build packages
echo "Building glusterfs-${version}-${release} for ${flavor}"
git config --global user.email "[email protected]"
git config --global user.name "Gluster"
cd build
echo "Cloning Gluster branch - ${branch} "
git clone --branch ${branch} https://github.com/gluster/glusterfs.git
cd glusterfs/
echo "Configuring and building Glusterfs "
./autogen.sh
./configure --enable-fusermount --enable-gnfs
echo "Running Make Dist"
make dist
cp glusterfs-${version}.tar.gz ../../
echo "Untaring.."
tar -xzvf glusterfs-${version}.tar.gz
echo "Creating link file.."
ln -s glusterfs-${version}.tar.gz glusterfs_${version}.orig.tar.gz
# Changelogs needed for building are maintained in a separate repo.
# the repo has to be clone and updated properly so we can copy the changelogs so far.
echo "Cloning the glusterfs-debian repo"
git clone http://github.com/gluster/glusterfs-debian.git
cd glusterfs-debian/
git checkout -b ${flavor}-${series}-local origin/${flavor}-glusterfs-${series}
sed -i "1i glusterfs (${version}-${os}1~${flavor}1) ${flavor}; urgency=medium\n\n * GlusterFS ${version} GA\n\n -- GlusterFS GlusterFS deb packages <[email protected]> `date +"%a, %d %b %Y %T %z"`\n" debian/changelog
git commit -a -m "Glusterfs ${version} G.A (${flavor})"
echo "Copying Changelog to source"
cp -a debian ../glusterfs-${version}/
echo "Building source package.."
cd ../glusterfs-${version}
debuild -us -uc
cd ../
echo "Copying source package.."
cp *.*deb /out/.