diff options
author | Sebastian Reichel <sre@ring0.de> | 2017-10-03 21:08:10 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2017-10-03 21:08:10 +0200 |
commit | accb504b576d91abedb60c7489a6f6b2e38d056c (patch) | |
tree | 1d2ee417c2d194ceb5990d9a0e2ad3f7d37b57fd | |
parent | a2853ab8c2b9f44066030b7ed6a44b5dc2533948 (diff) | |
download | serial-barcode-scanner-accb504b576d91abedb60c7489a6f6b2e38d056c.tar.bz2 |
systemd: add Makefile
-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 |