From 87b1a4ab72fb27d66f86dcb48538900ae072770d Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 23 Jul 2022 01:47:38 +0200 Subject: [PATCH] Install WKD update script/service/timer with Makefile Makefile: Extend install target to also install the WKD update script and the systemd service and timer. Vendor enable the systemd timer. --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index f60c5b7..5a99c40 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ PREFIX ?= /usr/local KEYRING_TARGET_DIR=$(DESTDIR)$(PREFIX)/share/pacman/keyrings/ KEYRING_FILES=$(wildcard build/*.gpg) $(wildcard build/*-revoked) $(wildcard build/*-trusted) +SCRIPT_TARGET_DIR=$(DESTDIR)$(PREFIX)/bin/ +SCRIPT_FILES=wkd_sync/archlinux-keyring-wkd-sync +SYSTEMD_SYSTEM_UNIT_DIR=$(DESTDIR)$(shell pkgconf --variable systemd_system_unit_dir systemd) +SYSTEMD_FILES=$(wildcard wkd_sync/*.service) $(wildcard wkd_sync/*.timer) +SYSTEMD_TIMER_DIR=$(SYSTEMD_SYSTEM_UNIT_DIR)/timers.target.wants/ +SYSTEMD_TIMER_FILE=archlinux-keyring-wkd-sync.timer SOURCES := $(shell find keyring) $(shell find libkeyringctl -name '*.py' -or -type d) keyringctl all: build @@ -31,6 +37,10 @@ clean: install: build install -vDm 755 $(KEYRING_FILES) -t $(KEYRING_TARGET_DIR) + install -vDm 755 $(SCRIPT_FILES) -t $(SCRIPT_TARGET_DIR) + install -vDm 644 $(SYSTEMD_FILES) -t $(SYSTEMD_SYSTEM_UNIT_DIR) + install -vdm 755 $(SYSTEMD_TIMER_DIR) + ln -sv ../$(SYSTEMD_TIMER_FILE) $(SYSTEMD_TIMER_DIR)/$(SYSTEMD_TIMER_FILE) uninstall: rm -f $(KEYRING_TARGET_DIR)/archlinux{.gpg,-trusted,-revoked}