fedora-kickstarts/Makefile
Bruno Wolff III 0ecefe0230 Fix to work with multiple tags
If there are multiple tags pointing to HEAD we need to pick only
one. We'll take one that seems to be a version number. This allows
the version number tag to coexist with another tag, that perhaps
indicates which images it was used to build.
2013-06-29 22:08:06 -05:00

37 lines
848 B
Makefile

# Get the version name first by seeing if HEAD is tagged
version := $(shell git tag --points-at HEAD -l '0.*.*' | head -1)
# And if it wasn't use a git hash
ifeq ($(version),)
version := $(shell git log -1 --abbrev=8 --pretty=git%h)
endif
DESTDIR := /usr
DATADIR := $(DESTDIR)/share
DOCDIR := $(DATADIR)/doc
name := spin-kickstarts
all: dist
install:
mkdir -p -m 755 $(DATADIR)/$(name)
install *.ks* -m 644 $(DATADIR)/$(name)
mkdir -p -m 755 $(DATADIR)/$(name)/custom
install -m 644 custom/* $(DATADIR)/$(name)/custom
mkdir -p -m 755 $(DATADIR)/$(name)/l10n
install -m 644 l10n/* $(DATADIR)/$(name)/l10n
clean:
rm -f $(name)-*.tar.gz
dist:
git archive --format=tar --prefix=$(name)-$(version)/ HEAD | gzip > $(name)-$(version).tar.gz
publish:
scp $(name)-$(version).tar.gz fedorahosted.org:$(name)
dist-clean:
git clean -f -d