From 1281bc4a90c99ab96aa7d702891d305d8bc185b6 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 6 Jan 2022 13:55:17 +0100 Subject: [PATCH] Makefile: dist-rpm: copy in RPM sources dir instead of automatically creating rpm --- Makefile | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index d5f08d3..f45f312 100644 --- a/Makefile +++ b/Makefile @@ -150,14 +150,6 @@ uninstall: done dist: clean - @for f in ChangeLog NEWS; do\ - case `sed 15q $$f` in \ - *"$(VERSION)"*) : ;; \ - *) \ - echo "$$f not updated; not releasing" 1>&2;\ - exit 1;; \ - esac; \ - done @rm -f history/$(dist_archive) @$(INSTALL_DIR) history @echo "Creating a temporary copy of the entire repository..." @@ -178,27 +170,10 @@ dist: clean popd >/dev/null;\ rm -fr $$tmpdir -dist-rpm: dist $(PACKAGE).spec - @rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\ - rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\ - rpm_specdir=`rpm --eval=%{_specdir} 2>/dev/null`;\ - for d in $$rpm_sourcedir $$rpm_specdir; do\ - [ -d "$$d" ] || \ - { echo "not found: $$d" 1>&2; exit 1; };\ - done;\ - echo "Copying $(dist_archive) to $$rpm_sourcedir...";\ - (cp -p history/$(dist_archive) $$rpm_sourcedir &&\ - mv -f $(PACKAGE).spec $$rpm_specdir &&\ - echo "Creating rpm and srpm packages..." &&\ - rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1 - @echo "All done. Enjoy using $(PACKAGE)..." - -dist-rpm-install: dist-rpm - @echo "Installing rpm packages..." - @rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\ - sudo rpm -hUv --force\ - $$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\ - || exit 1 +dist-rpm: dist + @rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\ + mv -f history/$(dist_archive) $$rpm_sourcedir;\ + echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'" clean: mostlyclean rm -f history/$(dist_archive)