nuq/RPM/build_rpm.in
2000-08-20 05:51:42 +00:00

27 lines
616 B
Bash

#!/bin/sh -x
version=@VERSION@
temp_dir=/var/tmp
srcdir=@srcdir@
if [ "$srcdir" = "." ]; then
srcdir=..
fi
rm -rf BUILD SPECS RPMS SOURCES SRPMS
mkdir -p BUILD SPECS RPMS/{noarch,i386,i686} SOURCES SRPMS
rm -rf ${temp_dir}/nuq-${version}
cp -a $srcdir ${temp_dir}/nuq-${version}
dest_dir=$PWD
cd ${temp_dir}/nuq-${version}
# this is needed to ensure there is a makefile
./bootstrap
./configure
make distclean
cd ${temp_dir}
tar zcf ${dest_dir}/SOURCES/nuq-${version}.tar.gz nuq-${version}
cd ${dest_dir}
rm -rf ${temp_dir}/nuq-${version}
cat > rpmmacros <<EOF
%_topdir $PWD
EOF
rpm -ba nuq.spec --rcfile rpmrc