From 3639b7a3f4b2154e47ae86aa42fed0e437e8cf18 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Fri, 7 Jul 2023 13:33:21 +0200 Subject: [PATCH] fix(Makefile): add uninstall target --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1115b9f..ed459f7 100644 --- a/Makefile +++ b/Makefile @@ -68,4 +68,12 @@ install: build # NOTE: Set restrict file permissions by default to protect optional basic auth credentials install -D --mode 0600 --target-directory ${DESTDIR}/etc/conf.d ${EXECUTABLE} - install -D --mode 0755 --target-directory ${DESTDIR}${PREFIX}/share/licenses/LICENSE LICENSE \ No newline at end of file + install -D --mode 0755 --target-directory ${DESTDIR}${PREFIX}/share/licenses/LICENSE LICENSE + +.PHONY: uninstall +uninstall: + -rm --recursive --force \ + ${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \ + ${DESTDIR}/usr/lib/systemd/system/${EXECUTABLE}.service \ + ${DESTDIR}/etc/conf.d/${EXECUTABLE} \ + ${DESTDIR}${PREFIX}/share/licenses/${EXECUTABLE}/LICENSE