build_rpm now works outside of ${srcdir} and make clean cleans up afterwards

This commit is contained in:
Bill Currie 2000-08-31 00:18:35 +00:00
parent df4ecf260b
commit 599f05c84b
2 changed files with 5 additions and 7 deletions

View file

@ -1 +1,2 @@
EXTRA_DIST = build_rpm.in nuq.spec.in
CLEANFILES = -r BUILD RPMS SOURCES SPECS SRPMS rpmmacros

View file

@ -1,17 +1,14 @@
#!/bin/sh -x
#!/bin/sh -ex
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
(cd ${srcdir}; make dist)
mv ${srcdir}/nuq-${version}.tar.gz SOURCES
(cd ..; make dist)
(cd SOURCES; ln -s ../../nuq-${version}.tar.gz .)
cat > rpmmacros <<EOF
%_topdir $PWD
EOF
rpm -ba nuq.spec --rcfile rpmrc
rpm -ba nuq.spec --rcfile ${srcdir}/rpmrc