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
|
#!/bin/sh
#
# $RCSfile$
#
if [ ! -f "configure.in" -o ! -f "adm/rpm_spec" ]; then
echo "You must be running this script from the topdir directory."
fi
# Note: this script assume that release_bin has already been called.
echo "Getting version number"
VERSION=`grep AM_INIT_AUTOMAKE configure.in | sed -e 's/[^0-9]*\([.0-9]*\).*/\1/'`
echo " Version is " $VERSION
echo "Creating spec file"
sed -e "s/@VERSION@/$VERSION/" adm/rpm_spec > /usr/src/redhat/SPECS/xxdiff-$VERSION.spec
echo "Copying pristine build"
if [ ! -f "../xxdiff-$VERSION.i386.tar.gz" ]; then
echo "You must be running this script from the topdir directory."
fi
cp ../xxdiff-$VERSION.i386.tar.gz /usr/src/redhat/SOURCES
echo "Building binary package"
rpm -ba /usr/src/redhat/SPECS/xxdiff-$VERSION.spec
echo "Copy binary package home"
cp /usr/src/redhat/RPMS/i386/xxdiff-$VERSION*.i386.rpm /home/blais
chmod 777 /home/blais/xxdiff-$VERSION*.i386.rpm
echo "Done."
|