cp/guest: clean up guest_create's console handling
[hvf.git] / build / re2c / makerpm.in
blob990907958f2aee72f248b21718dd99b6cdbc7dc6
1 #! /bin/sh
3 # $Id: makerpm.in 545 2006-05-25 13:39:46Z helly $
4 # M.Boerger <re2c@somabo.de>
6 PREFIX="@PACKAGE_NAME@"
7 VERSION="@PACKAGE_VERSION@"
8 TARDIR="`basename \`pwd\``"
9 RELEASE=${1:-1}
11 echo "Usage:"
12 echo "$0 <release>"
13 echo
14 echo "e.g.:"
15 echo "$0"
16 echo -n "Building RPM version $VERSION, release: $RELEASE "
17 sleep 1 ; echo -n . ; sleep 1 ; echo -n . ; sleep 1 ; echo -n .
18 echo
20 TAR=@PACKAGE_TARNAME@-$VERSION.tar.gz
21 SPEC=re2c-${VERSION}.spec
23 RPMBASE=/usr/src/redhat
24 for i in /usr/src/redhat /usr/src/packages /usr/src/RPM; do
25 if test -d $i; then
26 RPMBASE=$i
27 break
29 done
31 RPMDIR=${RPMBASE}/RPMS
32 SPECDIR=${RPMBASE}/SPECS
33 SRCDIR=${RPMBASE}/SOURCES
35 make dist
36 cp $TAR $SRCDIR
38 cat re2c.spec | sed -e "s/RPM_RELEASE/${RELEASE}/g" > ${SPEC}
40 echo "CP: (`pwd`) cp -a $SPEC $SPECDIR/${SPEC}"
41 cp -a $SPEC $SPECDIR/${SPEC}
42 #cp -a *.patch $SRCDIR
43 cd $SPECDIR
44 echo "RPM: rpm -ba ${SPEC}"
45 rpmbuild -ba ${SPEC}