From 94dfc2f31b439db37b67d58e635169c29a4f8dde Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Sep 16 2020 15:31:08 +0000 Subject: Add a local-srpm target to build an srpm from the current checkout The srpm target will pull the origin master branch and build from that so it isn't useful for testing local changes. --- diff --git a/Makefile.am b/Makefile.am index 16d103e..883c593 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,18 @@ ARCHIVEOUTDIR=$(shell cd $(top_srcdir) && pwd) local-archive: $(MAKE) archive ORIGIN=$(ARCHIVEOUTDIR) +local-srpm: + repo=`pwd`; \ + tmpdir=`mktemp -d /tmp/make_archive_XXXXXX`; \ + if test -d "$$tmpdir" ; then \ + git clone . $$tmpdir;\ + cd $$tmpdir;\ + ./make-srpm.sh;\ + cp -v $(distdir)-*.src.rpm $(ARCHIVEOUTDIR)/;\ + chmod -R u+rw $$tmpdir;\ + rm -fr $$tmpdir;\ + fi + srpm: repo=`pwd`; \ tmpdir=`mktemp -d /tmp/make_archive_XXXXXX`; \