diff options
Diffstat (limited to 'build_rpm')
-rwxr-xr-x | build_rpm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build_rpm b/build_rpm new file mode 100755 index 0000000..c52078c --- /dev/null +++ b/build_rpm @@ -0,0 +1,19 @@ +#!/bin/sh + +RPM=`rpm --eval '%{_topdir}'` +[ -d "$RPM/SPECS" -a -d "$RPM/SOURCES" ] || exit 1 + +VERSION=`perl -ne '/VERSION\s+=[^0-9\.]*([0-9\.]+)/ and print "$1\n"' URPM.pm` + +echo "building URPM version $VERSION" + +rm -f "URPM-$VERSION.tar.gz" +perl Makefile.PL +make dist +[ $? = 0 ] || exit 2 +[ -f "URPM-$VERSION.tar.gz" ] || exit 3 + +cp -f perl-URPM.spec "$RPM/SPECS" +bzme URPM-$VERSION.tar.gz +mv -f URPM-$VERSION.tar.bz2 "$RPM/SOURCES" +rpm -ba --clean --rmsource "$RPM/SPECS/perl-URPM.spec" |