quakeforge/RPM/build_rpm.in
2006-07-23 02:45:13 +00:00

25 lines
548 B
Bash

#!/bin/sh -x
set -e
version=@VERSION@
temp_dir=/var/tmp
srcdir=@srcdir@
top_srcdir=@top_srcdir@
top_builddir=..
mkdir -p RPMS/{noarch,i386,i686}
test -d $top_srcdir/CVS && make -C $top_builddir changelog
make -C $top_builddir dist
cat > rpmmacros <<EOF
%_topdir $PWD
%_rpmdir $PWD/RPMS
%_sourcedir $top_builddir
%_specdir $PWD
%_srcrpmdir $PWD
%_builddir $PWD
EOF
rpmbuild -ba quakeforge.spec --rcfile $srcdir/rpmrc
find . -maxdepth 1 -type d -name 'quakeforge-*' -exec rm -rf {} \;
find RPMS -name '*.rpm' -exec mv {} . \;
rm -rf RPMS