blob: 990907958f2aee72f248b21718dd99b6cdbc7dc6 (
plain)
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
|
#! /bin/sh
# $Id: makerpm.in 545 2006-05-25 13:39:46Z helly $
# M.Boerger <re2c@somabo.de>
PREFIX="@PACKAGE_NAME@"
VERSION="@PACKAGE_VERSION@"
TARDIR="`basename \`pwd\``"
RELEASE=${1:-1}
echo "Usage:"
echo "$0 <release>"
echo
echo "e.g.:"
echo "$0"
echo -n "Building RPM version $VERSION, release: $RELEASE "
sleep 1 ; echo -n . ; sleep 1 ; echo -n . ; sleep 1 ; echo -n .
echo
TAR=@PACKAGE_TARNAME@-$VERSION.tar.gz
SPEC=re2c-${VERSION}.spec
RPMBASE=/usr/src/redhat
for i in /usr/src/redhat /usr/src/packages /usr/src/RPM; do
if test -d $i; then
RPMBASE=$i
break
fi
done
RPMDIR=${RPMBASE}/RPMS
SPECDIR=${RPMBASE}/SPECS
SRCDIR=${RPMBASE}/SOURCES
make dist
cp $TAR $SRCDIR
cat re2c.spec | sed -e "s/RPM_RELEASE/${RELEASE}/g" > ${SPEC}
echo "CP: (`pwd`) cp -a $SPEC $SPECDIR/${SPEC}"
cp -a $SPEC $SPECDIR/${SPEC}
#cp -a *.patch $SRCDIR
cd $SPECDIR
echo "RPM: rpm -ba ${SPEC}"
rpmbuild -ba ${SPEC}
|