forked from ganglia/monitor-core
/
package-ganglia-release
executable file
·48 lines (36 loc) · 1.04 KB
/
package-ganglia-release
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
#!/bin/bash
#
# $Id$
# $Author$
#
TAG=$1
CURDIR="$( pwd )"
if [ "$TAG" == "" ]; then
echo "syntax: $0 TAG"
exit
fi
TMP="/tmp/ganglia-export-$TAG"
echo "Exporting tag $TAG"
svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/tags/${TAG}" "$TMP"
#svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/branches/3.2" "$TMP"
#svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/trunk" "$TMP"
(
cd "$TMP"
(
cd monitor-core
# Create all configure scripts, etc
./bootstrap
# Create initial ganglia.spec file with RHEL5 defaults
cp ganglia.spec.in ganglia.spec -f
perl -pi -e 's/\@PACKAGE\@/ganglia/g;' ganglia.spec
perl -pi -e "s/\@VERSION\@/${TAG}/g;" ganglia.spec
perl -pi -e 's/\@REL\@/1/g;' ganglia.spec
perl -pi -e 's/\@varstatedir\@/\/var\/lib/g;' ganglia.spec
# Clean extra stuff
rm -rf autom4te.cache libmetrics/autom4te.cache
)
mv -v "monitor-core" "ganglia-$TAG"
tar czvf "$CURDIR/ganglia-$TAG.tar.gz" "ganglia-$TAG"
)
echo "Built tarball in $CURDIR/ganglia-$TAG.tar.gz"
rm -Rf "$TMP"