summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1a1fdef
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+PACKAGE = rapid-tunneling
+SPEC = rapid-tunneling.spec
+
+SOURCES = rapid-tunneling
+
+VER = $(shell awk '/^Version: / {print $$2}' $(SPEC)| head -n 1)
+REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1)
+
+all: rpm
+
+rpm: $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz
+ mkdir -p BUILD RPMS SOURCES SRPMS
+ [ -e SPECS ] || ln -s . SPECS
+ cd SPECS; rpmbuild --target noarch --define "_topdir $(PWD)" -ba $(SPEC)
+
+SOURCES/$(PACKAGE)-%.tar.gz: $(SOURCES)
+ tar czf $@ --transform 's|^|$(PACKAGE)-$(VER)/|' $^