First commit

This commit is contained in:
2025-12-28 11:09:19 +01:00
parent 3a7d95c7b2
commit c0989dc7cf
4 changed files with 118 additions and 0 deletions

28
Makefile Normal file
View 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