First commit
This commit is contained in:
28
Makefile
Normal file
28
Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
NAME = "$(shell basename $PWD)"
|
||||
VERSION = "$(shell git describe | sed 's/-/./g' || echo '0.1.0')"
|
||||
BRANCH = "$(shell git branch --show-current)"
|
||||
|
||||
RPM_SOURCEDIR = "$(shell rpm --eval '%{_sourcedir}')
|
||||
RPM_SYSCONFDIR = "$(shell rpm --eval '%{_sysconfdir}')"
|
||||
|
||||
.PHONY: name
|
||||
name:
|
||||
@echo "$(NAME)"
|
||||
|
||||
.PHONY: version
|
||||
version:
|
||||
@echo "$(VERSION)"
|
||||
|
||||
$(RPMSOURCE_DIR)/$(NAME)-%.tar.gz: *
|
||||
git archive --format=tar.gz \
|
||||
--output="$@" \
|
||||
--prefix="$(NAME)-$(VERSION)/" \
|
||||
--verbose \
|
||||
"$(BRANCH)"
|
||||
|
||||
.PHONY: tarball
|
||||
tarball: $(RPM_SOURCEDIR)/$(NAME)-$(VERSION).tar.gz
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
install -m 644 --target-directory=$(DESTDIR)/$(RPM_SYSCONFDIR)/nginx nginx.conf
|
||||
Reference in New Issue
Block a user