summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-04-12 13:54:25 -0700
committerJacob Keller <jacob.e.keller@intel.com>2017-04-12 15:27:20 -0700
commite815e2872032f04ef7e51c225df1d8928b8abdf9 (patch)
tree23928408820120d400637dbdbf68a88d83a6bfcf
parent881c415c242729c07aefd73484d528f949d5ccc7 (diff)
downloadaiaiai-e815e2872032f04ef7e51c225df1d8928b8abdf9.tar.gz
packaging: Add a "rpm" make target
It requires the tarball to be created and will create a source RPM in the current directory. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--packaging/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/packaging/Makefile b/packaging/Makefile
index a10564b..1686e03 100644
--- a/packaging/Makefile
+++ b/packaging/Makefile
@@ -7,4 +7,12 @@ tarball:
@rm -f *.tar.bz2
@cd .. && git archive --prefix $(PKG_NAME)-$(PKG_VERSION)/ HEAD | gzip > packaging/$(TARBALL)
-all: tarball
+rpm: tarball
+ @rm -f *.rpm
+ rpmbuild -bs $(SPECFILE) --define "_sourcedir $(shell pwd)" \
+ --define "_srcrpmdir $(shell pwd)" \
+
+all: tarball rpm
+
+clean:
+ -rm -f *.tar.bz2 *.rpm