diff options
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/systemd/Makefile b/systemd/Makefile new file mode 100644 index 0000000..b4dc1c1 --- /dev/null +++ b/systemd/Makefile @@ -0,0 +1,23 @@ +INSTALLPATH=/lib/systemd/system/ +UDEVPATH=/lib/udev/rules.d/ +SERVICEFILES=$(wildcard *.service) +TIMERFILES=$(wildcard *.timer) +RULESFILES=$(wildcard *.timer) + +install: ${SERVICEFILES} ${TIMERFILES} ${RULESFILES} + @echo Installing systemd files into ${INSTALLPATH}... + @mkdir -p ${INSTALLPATH} + @$(foreach file,${SERVICEFILES},install -m644 ${file} ${INSTALLPATH}/${file};) + @$(foreach file,${TIMERFILES},install -m644 ${file} ${INSTALLPATH}/${file};) + @echo Installing udev files into ${UDEVPATH}... + @mkdir -p ${UDEVPATH} + @$(foreach file,${RULESFILES},install -m644 ${file} ${UDEVPATH}/${file};) + +uninstall: + @echo Remove systemd files from ${INSTALLPATH}... + @$(foreach file,${SERVICEFILES},rm -f ${INSTALLPATH}/${file};) + @$(foreach file,${TIMERFILES},rm -f ${INSTALLPATH}/${file};) + @echo Remove udev files from ${UDEVPATH}... + @$(foreach file,${RULESFILES},rm -f ${UDEVPATH}/${file};) + +.PHONY: install uninstall |