From: David Howells Date: Tue, 25 Jun 2019 19:32:28 +0000 (+0100) Subject: makefile: Build the tarball and then build the rpm from that X-Git-Tag: v0.3~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=11fe3d5c46f98cfa10643677cd5bd7d8c8ea8ba5;p=users%2Fdhowells%2Fkafs-client.git makefile: Build the tarball and then build the rpm from that Build the tarball and then build the rpm from that as separate steps. Signed-off-by: David Howells --- diff --git a/Makefile b/Makefile index cff3865..ad67936 100644 --- a/Makefile +++ b/Makefile @@ -90,8 +90,8 @@ distclean: clean # ############################################################################### $(ZTARBALL): - git archive --prefix=kafs-client-$(VERSION)/ --format tar -o $(TARBALL) HEAD - bzip2 -9 <$(TARBALL) >$(ZTARBALL) + git archive --prefix=kafs-client-$(VERSION)/ --format tar HEAD | \ + bzip2 -9 >$(ZTARBALL) tarball: $(ZTARBALL) @@ -123,12 +123,11 @@ RPMBUILDDIRS := \ RPMFLAGS := \ --define "buildid $(BUILDID)" -rpm: +rpm: tarball mkdir -p rpmbuild chmod ug-s rpmbuild mkdir -p rpmbuild/{SPECS,SOURCES,BUILD,BUILDROOT,RPMS,SRPMS} - git archive --prefix=kafs-client-$(VERSION)/ --format tar -o $(SRCBALL) HEAD - bzip2 -9 <$(SRCBALL) >$(ZSRCBALL) + cp $(ZTARBALL) $(ZSRCBALL) rpmbuild -ts $(ZSRCBALL) --define "_srcrpmdir rpmbuild/SRPMS" $(RPMFLAGS) rpmbuild --rebuild $(SRPM) $(RPMBUILDDIRS) $(RPMFLAGS)