import repository from arizona
[raven.git] / publish / gec7demo / buildpackage.sh
1 source ./ver.sh
2
3 RPMDIR=~/rpm
4 CWD=`pwd`
5
6 echo building version ver=$VER, rel=$REL
7
8 echo "%_topdir $RPMDIR" > ~/.rpmmacros
9 mkdir -p $RPMDIR/SOURCES
10 mkdir -p $RPMDIR/SPECS
11 mkdir -p $RPMDIR/BUILD
12 mkdir -p $RPMDIR/RPMS
13 mkdir -p $RPMDIR/RPMS/noarch
14
15 rm -rf $RPMDIR/RPMS/noarch
16
17 chmod +x phonehome/demophonehome.py
18
19 AWK="awk '{gsub(/@VER@/,\"$VER\"); gsub(/@REL@/,\"$REL\"); print;}' phonehome/demophonehome.spec"
20 eval $AWK > $RPMDIR/SPECS/demophonehome.spec
21
22 #cp phonehome/demophonehome.spec $RPMDIR/SPECS/
23
24 cp phonehome/demophonehome.py $RPMDIR/BUILD/
25
26 cd $RPMDIR/SPECS
27 rpmbuild -bb demophonehome.spec --target=noarch
28
29 rm -f $CWD/packages/demophonehome*.rpm
30 cp $RPMDIR/RPMS/noarch/*.rpm $CWD/packages/
31
32 source ./tellcolor.sh
33
34 echo VER=$VER, REL=$REL
35 echo do this:
36 echo 1\) ./generate.sh
37 echo 2\) upload packages/demophonehome*.rpm
38 echo 3\) upload *.tpfile