LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File nut-systemd-dirs.patch of Package nut (Project home:ghostlyrat)

diff -Nru nut-2.7.3/configure.ac nut-2.7.3new/configure.ac
--- nut-2.7.3/configure.ac	2015-04-22 11:34:30.000000000 +0300
+++ nut-2.7.3new/configure.ac	2015-04-26 22:27:42.513749098 +0300
@@ -1065,7 +1065,12 @@
 dnl prefix. This is needed for 'distcheck*' targets, otherwise
 dnl files will try to get intalled to the actual system directories
 if test -n "${systemdsystemunitdir}"; then
-	systemdsystemshutdowndir="${libdir}/systemd/system-shutdown"
+	systemdutildir=`$PKG_CONFIG --variable=systemdutildir systemd`
+	if test -n "${systemdutildir}"; then
+		systemdsystemshutdowndir="${systemdutildir}/system-shutdown"
+	else
+		systemdsystemshutdowndir="${systemdsystemunitdir}/system-shutdown"
+	fi
 	AC_MSG_RESULT(using ${systemdsystemunitdir})
 else
 	AC_MSG_RESULT(no)