Files
netoik-rp/Makefile
samuel f811e72e64
All checks were successful
Continuous Integration / env (push) Successful in 0s
Add certbot renew service
2026-01-18 12:42:37 +01:00

35 lines
1.1 KiB
Makefile

NAME = $(shell basename $(PWD))
VERSION = $(shell git describe | sed 's/-/./g')
BRANCH = $(shell git branch --show-current)
RPM_SBINDIR = $(shell rpm --eval '%{_sbindir}')
RPM_SOURCEDIR = $(shell rpm --eval '%{_sourcedir}')
RPM_SYSCONFDIR = $(shell rpm --eval '%{_sysconfdir}')
RPM_UNITDIR = $(shell rpm --eval '%{_unitdir}')
RPM_TARBALL_PATH = $(RPM_SOURCEDIR)/$(NAME)-$(VERSION).tar.gz
.PHONY: name
name:
@echo "$(NAME)"
.PHONY: version
version:
@echo "$(VERSION)"
$(RPM_TARBALL_PATH): *
git archive --format=tar.gz \
--output="$@" \
--prefix="$(NAME)-$(VERSION)/" \
--verbose \
"$(BRANCH)"
.PHONY: tarball
tarball: $(RPM_TARBALL_PATH)
.PHONY: install
install:
install --directory $(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d $(DESTDIR)$(RPM_SYSCONFDIR)/certbot $(DESTDIR)$(RPM_UNITDIR)
install --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/nginx/conf.d conf/nginx/0_security.conf conf/nginx/default.conf
install --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/certbot conf/certbot/ovh.ini
install --target-directory=$(DESTDIR)$(RPM_UNITDIR) conf/systemd/certbot-renew.service conf/systemd/certbot-renew.timer