Diff between f30cbaa43d28b430104393b76c648323d8100b33 and daa86e06c376d6e92bb0d1e2f1edb649974bfcbd

Changed Files

File Additions Deletions Status
Makefile.am +3 -0 modified
Makefile.obexd +1 -2 modified
Makefile.tools +3 -0 modified
configure.ac +9 -0 modified
tools/mpris-proxy.service.in +13 -0 added

Full Patch

diff --git a/Makefile.am b/Makefile.am
index 68bf058..88044aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,9 @@ if SYSTEMD
 systemdsystemunitdir = $(SYSTEMD_SYSTEMUNITDIR)
 systemdsystemunit_DATA = src/bluetooth.service
 
+systemduserunitdir = $(SYSTEMD_USERUNITDIR)
+systemduserunit_DATA =
+
 dbussystembusdir = $(DBUS_SYSTEMBUSDIR)
 dbussystembus_DATA = src/org.bluez.service
 endif
diff --git a/Makefile.obexd b/Makefile.obexd
index b7e9f2d..4cdce73 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -2,8 +2,7 @@
 if OBEX
 
 if SYSTEMD
-systemduserunitdir = $(SYSTEMD_USERUNITDIR)
-systemduserunit_DATA = obexd/src/obex.service
+systemduserunit_DATA += obexd/src/obex.service
 
 dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
 dbussessionbus_DATA = obexd/src/org.bluez.obex.service
diff --git a/Makefile.tools b/Makefile.tools
index 5b90340..48bc47b 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -332,6 +332,9 @@ tools_hex2hcd_SOURCES = tools/hex2hcd.c
 
 tools_mpris_proxy_SOURCES = tools/mpris-proxy.c
 tools_mpris_proxy_LDADD = gdbus/libgdbus-internal.la $(GLIB_LIBS) $(DBUS_LIBS)
+if SYSTEMD
+systemduserunit_DATA += tools/mpris-proxy.service
+endif
 
 tools_gatt_service_SOURCES = tools/gatt-service.c
 tools_gatt_service_LDADD = gdbus/libgdbus-internal.la \
diff --git a/configure.ac b/configure.ac
index a7fb51f..790a195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -428,6 +428,14 @@ fi
 #
 # Otherwise we'll end up with literal references in the final binaries or
 # manuals, which is not something we really want.
+#
+pkgbindir="${bindir}"
+if (test "$bindir" = '${exec_prefix}/bin'); then
+	pkgbindir="${exec_prefix}/bin"
+else
+	pkgbindir="${bindir}"
+fi
+AC_SUBST(PKGBINDIR, "${pkgbindir}")
 
 if (test "$libexecdir" = '${exec_prefix}/libexec'); then
 	pkglibexecdir="${exec_prefix}/libexec/bluetooth"
@@ -496,5 +504,6 @@ AC_CONFIG_FILES(
 	src/bluetoothd.rst
 	src/bluetooth.service
 	tools/bluetooth-logger.service
+	tools/mpris-proxy.service
 )
 AC_OUTPUT
diff --git a/tools/mpris-proxy.service.in b/tools/mpris-proxy.service.in
new file mode 100644
index 0000000..5307490
--- /dev/null
+++ b/tools/mpris-proxy.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=Bluetooth mpris proxy
+Documentation=man:mpris-proxy(1)
+
+Wants=dbus.socket
+After=dbus.socket
+
+[Service]
+Type=simple
+ExecStart=@PKGBINDIR@/mpris-proxy
+
+[Install]
+WantedBy=default.target