blob: c52078c986dd04c2a05c616123a1633dbe5e15b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"
|