From 3f04cf9b591c7331b32bdf1cfe88347bae396d90 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 29 Jun 2021 15:45:59 -0700 Subject: [PATCH] Makefile: Add local-srpm target to create a .src.rpm from HEAD --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 8a8f278e..29320892 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,12 @@ local: @rm -rf /var/tmp/$(PKGNAME)-$(VERSION) @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz" +local-srpm: local $(PKGNAME).spec + rpmbuild -bs \ + --define "_sourcedir $(CURDIR)" \ + --define "_srcrpmdir $(CURDIR)" \ + lorax.spec + test-in-copy: rsync -a --exclude=.git /lorax-ro/ /lorax/ make -C /lorax/ $(RUN_TESTS)