Initial commit -- packaging in progress
[u/jw35/ucam-sms-send.git] / build_rpm.sh
1 #!/bin/bash
2
3 set -e
4
5 VERSION=1.00
6
7 mkdir -p build
8 for d in BUILD RPMS SOURCES SPECS SRPMS; do mkdir -p build/${d}; done
9 perl Makefile.PL
10 rm Ucam-SMS-Send-${VERSION}.tar.gz
11 make dist
12 cp Ucam-SMS-Send-${VERSION}.tar.gz build/SOURCES
13 cp perl-Ucam-SMS-Send.spec build/SPECS
14 rpmbuild --define="_topdir `pwd`/build" -ba build/SPECS/perl-Ucam-SMS-Send.spec
15 cp build/RPMS/noarch/perl-Ucam-SMS-Send-${VERSION}.noarch.rpm .
16 cp build/SRPMS/perl-Ucam-SMS-Send-${VERSION}.src.rpm .
17 #rm -rf build
18