diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2018-03-06 17:16:50 -0500 |
---|---|---|
committer | Jeff Moyer <jmoyer@redhat.com> | 2018-03-06 17:22:46 -0500 |
commit | d3766b1be75c914e3453e0a3558a8bf968b537ae (patch) | |
tree | e721d2164b3b857bf35fe3d1689940a4d4b0d083 | |
parent | 7adf2554f9ad5eff2c9d67afb538ba64cbc1d234 (diff) | |
download | libaio-d3766b1be75c914e3453e0a3558a8bf968b537ae.tar.gz |
Makefile: convert tag and archive targets to git
In the process, change the tag format to not include the release.
The release portion is meant for distributers to bump when packaging
changes are made; it shouldn't be used for the upstream sources.
There's also no need to convert ',' to '-' in the tag.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
-rw-r--r-- | Makefile | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -1,8 +1,7 @@ NAME=libaio SPECFILE=$(NAME).spec VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) -RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE)) -CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) +TAG = $(NAME)-$(VERSION) RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") prefix=/usr @@ -28,17 +27,10 @@ clean: @$(MAKE) -C harness clean tag-archive: - @cvs -Q tag -F $(CVSTAG) - -create-archive: tag-archive - @rm -rf /tmp/$(NAME) - @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo GRRRrrrrr -- ignore [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 " " + @git tag $(TAG) + +create-archive: + @git archive --prefix=$(NAME)-$(VERSION)/ -o $(NAME)-$(VERSION).tar.gz $(TAG) @echo "The final archive is ./$(NAME)-$(VERSION).tar.gz." archive: clean tag-archive create-archive |