1
1
mirror of https://pagure.io/fedora-kickstarts.git synced 2024-11-23 23:53:08 +00:00
fedora-kickstarts/Makefile
Bruno Wolff III 2be322d626 Use the higher tag when there are more than one
If two or more tags of the right format point point to
HEAD, we probably want the later of the two.
2013-08-20 21:44:29 -05:00

39 lines
938 B
Makefile

# Get the version name first by seeing if HEAD is tagged
version := $(shell git tag --points-at HEAD -l '0.*.*' | sort -r | 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: $(name)-$(version).tar.gz
$(name)-$(version).tar.gz:
git archive --format=tar --prefix=$(name)-$(version)/ HEAD | gzip > $(name)-$(version).tar.gz
publish: $(name)-$(version).tar.gz
scp $(name)-$(version).tar.gz fedorahosted.org:$(name)
dist-clean:
git clean -f -d