fedora-kickstarts/Makefile

39 lines
941 B
Makefile
Raw Normal View History

# Get the version name first by seeing if HEAD is tagged
version := $(shell git tag --points-at HEAD)
# And if it wasn't use a git hash
ifeq ($(version),)
version := $(shell git log -1 --abbrev=8 --pretty=git%h)
endif
2013-06-29 19:45:41 +00:00
DESTDIR := /usr
2013-06-29 19:45:41 +00:00
DATADIR := $(DESTDIR)/share
DOCDIR := $(DATADIR)/doc
name := spin-kickstarts
2013-06-29 17:42:13 +00:00
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
mkdir -p -m 755 $(DOCDIR)/$(name)-$(version)
install -m 644 AUTHORS COPYING README $(DOCDIR)/$(name)-$(version)
clean:
rm -f $(name)-*.tar.gz
dist:
git archive --format=tar --prefix=$(name)-$(version)/ HEAD | gzip > $(name)-$(version).tar.gz
2013-06-29 18:53:08 +00:00
publish:
scp $(name)-$(version).tar.gz fedorahosted.org:$(name)
2013-06-29 18:53:08 +00:00
dist-clean:
git clean -f -d