[redhat-rpm-config: 42/215] i like make archive :)

Panu Matilainen pmatilai at fedoraproject.org
Wed Apr 2 10:21:53 UTC 2014


commit 555b69e7a21f7a25b8a45a5ceafd59f4aec1a207
Author: Bill Nottingham <notting at redhat.com>
Date:   Wed Dec 4 04:57:53 2002 +0000

    i like make archive :)

 Makefile |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2608fc2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+NAME=redhat-rpm-config
+VERSION=$(shell awk '/Version:/ { print $$2 }' $(NAME).spec)
+
+CVSROOT = $(shell cat CVS/Root 2>/dev/null || :)
+
+CVSTAG = REDHAT_RPM_CONFIG_$(subst .,_,$(VERSION))
+
+all:
+
+tag-archive:
+	@cvs -Q tag -F $(CVSTAG)
+
+create-archive:
+	@rm -rf /tmp/$(NAME)
+	@cd /tmp ; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo "Um... export aborted."
+	@mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION)
+	@cd /tmp ; tar -czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
+	@rm -rf /tmp/$(NAME)-$(VERSION)
+	@cp /tmp/$(NAME)-$(VERSION).tar.gz .
+	@rm -f /tmp/$(NAME)-$(VERSION).tar.gz
+	@echo ""
+	@echo "The final archive is in $(NAME)-$(VERSION).tar.gz"
+
+archive: tag-archive create-archive


More information about the scm-commits mailing list