Debian Codegraph @

scripts/package-ganglia-release

raw symbols SCIP
1 #!/bin/bash
2 #
3 # $Author$
4 #
5
6 TAG=$1
7 CURDIR="$( pwd )"
8
9 if [ "$TAG" == "" ]; then
10 echo "syntax: $0 TAG"
11 exit
12 fi
13
14
15 TMP="/tmp/ganglia-export-$TAG"
16
17 echo "Exporting tag $TAG"
18 ( \
19 rm -rf "${TMP}"; \
20 mkdir -p "${TMP}"; \
21 cd "${TMP}" ; \
22 git clone git://github.com/ganglia/monitor-core.git ; \
23 cd monitor-core ; \
24 git checkout ${TAG}; \
25 git submodule init; \
26 git submodule update
27 )
28 #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/tags/${TAG}" "$TMP"
29 #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/branches/3.2" "$TMP"
30 #svn export "https://ganglia.svn.sourceforge.net/svnroot/ganglia/trunk" "$TMP"
31
32 (
33 cd "$TMP"
34 (
35 cd monitor-core
36
37 # Create all configure scripts, etc
38 ./bootstrap
39
40 # Cleanup git repo directories after autoconf uses them
41 rm -Rf .git */.git
42
43 # Create initial ganglia.spec file with RHEL5 defaults
44 cp ganglia.spec.in ganglia.spec -f
45 perl -pi -e 's/\@PACKAGE\@/ganglia/g;' ganglia.spec
46 perl -pi -e "s/\@VERSION\@/${TAG}/g;" ganglia.spec
47 perl -pi -e 's/\@REL\@/1/g;' ganglia.spec
48 perl -pi -e 's/\@varstatedir\@/\/var\/lib/g;' ganglia.spec
49
50 # Clean extra stuff
51 rm -rf autom4te.cache libmetrics/autom4te.cache
52 )
53 mv -v "monitor-core" "ganglia-$TAG"
54 tar czvf "$CURDIR/ganglia-$TAG.tar.gz" "ganglia-$TAG"
55 )
56
57 echo "Built tarball in $CURDIR/ganglia-$TAG.tar.gz"
58
59 rm -Rf "$TMP"
60