all repos — nergen.net-systemd.git @ b6aec7eefab950483c7506fb6cb69b21a8d8fc35

Unnamed repository; edit this file 'description' to name the repository.

GNUmakefile (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
.PHONY: all install uninstall

SYSTEMD_DIR ?= /usr/lib/systemd/system

UNITS := $(wildcard *.path) $(wildcard *.service) $(wildcard *.target)
INSTALLED_UNITS := $(UNITS:%=$(SYSTEMD_DIR)/%)

all:
	@echo "available makefile targets: 'install' 'uninstall'"

install:
	install -Dm644 -t $(SYSTEMD_DIR) $(UNITS)
	systemctl enable --now nergennet.target

uninstall:
	systemctl disable --now nergennet.target
	rm $(INSTALLED_UNITS)