From 213a1a4a99bc53ac4678178d3bc1a3f442658a59 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 17 May 2005 18:37:40 +0000 Subject: [PATCH] *** empty log message *** --- Make-rpm.mk | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Make-rpm.mk b/Make-rpm.mk index 81bb1727a57..bcea29585a9 100644 --- a/Make-rpm.mk +++ b/Make-rpm.mk @@ -101,14 +101,20 @@ tar-internal: rpm-internal: tar-internal @echo "Creating $$pkg*rpm ..."; \ + rpm --version | grep -q 'version 3' && rpm_ver=3; \ + rpm --version | grep -q 'version 4' && rpm_ver=4; \ +@echo "rpm_ver=$$rpm_ver"; \ for d in BUILD RPMS SOURCES SPECS SRPMS TMP; do \ if ! $$mkdir $$tmp/$$d >/dev/null; then \ echo "ERROR: Cannot create \"$$tmp/$$d\" dir." 1>&2; exit 1; fi; \ done; \ +@echo "pt1"; \ mv $$tmp/$$pkg.tgz $$tmp/SOURCES/ || exit 1; \ +@echo "pt2"; \ test -f $$tmp/$$pkg/$$proj.spec.in \ && spec=$$tmp/$$pkg/$$proj.spec.in \ || spec=$$tmp/$$pkg/$$proj.spec; \ +@echo "spec=$$spec"; \ if ! test -f $$spec; then \ echo "ERROR: Cannot find $$proj spec file in CVS." 1>&2; exit 1; fi; \ sed -e "s/^\([ ]*Name:\).*/\1 $$proj/i" \ @@ -116,11 +122,25 @@ rpm-internal: tar-internal -e "s/^\([ ]*Release:\).*/\1 $$rel/i" \ -e "s/^\([ ]*Source0?:\).*/\1 $$pkg.tgz/i" \ <$$spec >$$tmp/SPECS/$$proj.spec; \ +@echo "pt3"; \ if ! test -s $$tmp/SPECS/$$proj.spec; then \ echo "ERROR: Cannot create $$proj.spec." 1>&2; exit 1; fi; \ - rpmbuild --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \ - if ! rpmbuild -ba --define "_tmppath $$tmp/TMP" --define "_topdir $$tmp" \ - $$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \ +@echo "pt4"; \ + if test $$rpm_ver -eq 3; then \ +@echo "pt5"; \ + rpm --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \ +@echo "pt6"; \ + if ! rpm -ba --define "tmppath: $$tmp/TMP" --define "topdir: $$tmp" \ + $$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \ + >$$tmp/rpm.log 2>&1; then \ + cat $$tmp/rpm.log; exit 1; fi; \ +@echo "pt7"; \ + fi; \ + if test $$rpm_ver -eq 4; then \ + rpmbuild --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \ + if ! rpmbuild -ba --define "_tmppath $$tmp/TMP" --define "_topdir $$tmp" \ + $$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \ >$$tmp/rpm.log 2>&1; then \ - cat $$tmp/rpm.log; exit 1; fi; \ + cat $$tmp/rpm.log; exit 1; fi; \ + fi; \ cp -p $$tmp/RPMS/*/$$proj-*.rpm $$tmp/SRPMS/$$proj-*.src.rpm . || exit 1 -- GitLab