summarylogtreecommitdiffstats
path: root/systemd-unit-dir.patch
blob: bc5185614c2c9791986993773bcf309782c5c721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/Makefile b/Makefile
index 42ee710..4803d8d 100644
--- a/Makefile
+++ b/Makefile
@@ -51,10 +51,10 @@ DEFAULT_TARGETS+=systemd
 endif
 
 install_systemd: install_pmutils
-	install -D -m 644 contrib/systemd/autorandr-resume.service ${DESTDIR}/etc/systemd/system/autorandr-resume.service
+	install -D -m 644 contrib/systemd/autorandr-resume.service ${DESTDIR}$(shell pkg-config systemd --variable=systemdsystemunitdir)/autorandr-resume.service
 
 uninstall_systemd: uninstall_pmutils
-	rm -f ${DESTDIR}/etc/systemd/system/autorandr-resume.service
+	rm -f ${DESTDIR}$(shell pkg-config systemd --variable=systemdsystemunitdir)/autorandr-resume.service
 
 # Rules for udev
 HAVE_UDEV=$(shell [ -d /etc/udev/rules.d/ ] && echo "y")