Blame SOURCES/0001-Make-DBus-aware-of-systemd.patch

3a7434
From 03f949a0b394ab954fc68f33e092dc0bb1fec406 Mon Sep 17 00:00:00 2001
3a7434
From: Sumit Bose <sbose@redhat.com>
3a7434
Date: Tue, 28 Jun 2016 14:41:01 +0200
3a7434
Subject: [PATCH] Make DBus aware of systemd
3a7434
3a7434
---
3a7434
 Makefile.am                            | 1 +
3a7434
 configure.ac                           | 7 +++++++
3a7434
 dbus/org.freedesktop.realmd.service.in | 1 +
3a7434
 3 files changed, 9 insertions(+)
3a7434
3a7434
diff --git a/Makefile.am b/Makefile.am
3a7434
index 52de3dc..c81f048 100644
3a7434
--- a/Makefile.am
3a7434
+++ b/Makefile.am
3a7434
@@ -49,6 +49,7 @@ SED_SUBST = sed \
3a7434
 	-e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \
3a7434
 	-e 's,[@]srcdir[@],$(srcdir),g' \
3a7434
 	-e 's,[@]privatedir[@],$(privatedir),g' \
3a7434
+	-e 's,[@]dbus_systemd_service[@],$(dbus_systemd_service),g' \
3a7434
 	-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
3a7434
 	-e 's,[@]VERSION[@],$(VERSION),g' \
3a7434
 	$(NULL)
3a7434
diff --git a/configure.ac b/configure.ac
3a7434
index 032cdaa..0376887 100644
3a7434
--- a/configure.ac
3a7434
+++ b/configure.ac
3a7434
@@ -110,6 +110,13 @@ fi
3a7434
 SYSTEMD_UNIT_DIR="$with_systemd_unit_dir"
3a7434
 AC_SUBST(SYSTEMD_UNIT_DIR)
3a7434
 AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemd_unit_dir"])
3a7434
+
3a7434
+dbus_systemd_service=""
3a7434
+if test -n "$with_systemd_unit_dir"; then
3a7434
+	dbus_systemd_service="SystemdService=realmd.service"
3a7434
+fi
3a7434
+AC_SUBST(dbus_systemd_service)
3a7434
+
3a7434
 AC_MSG_RESULT($with_systemd_unit_dir)
3a7434
 
3a7434
 AC_ARG_WITH(systemd-journal,
3a7434
diff --git a/dbus/org.freedesktop.realmd.service.in b/dbus/org.freedesktop.realmd.service.in
3a7434
index 834e23f..51132f6 100644
3a7434
--- a/dbus/org.freedesktop.realmd.service.in
3a7434
+++ b/dbus/org.freedesktop.realmd.service.in
3a7434
@@ -2,3 +2,4 @@
3a7434
 Name=org.freedesktop.realmd
3a7434
 Exec=@privatedir@/realmd
3a7434
 User=root
3a7434
+@dbus_systemd_service@
3a7434
-- 
3a7434
2.7.4
3a7434