From 15cd7993b362c36c1bf4f8ff90a2e7028017ee44 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Fri, 12 Jun 2015 17:28:18 +0900 Subject: [PATCH] [systemd][fix] install service files to system directory for auto-launching on boot Change-Id: Ib5913a8ea94a5390cd5b18cf9e71a6a40e562860 --- configure.ac | 9 +++++---- packaging/pulseaudio.spec | 6 +++--- src/Makefile.am | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 7d38317..5c4eb63 100644 --- a/configure.ac +++ b/configure.ac @@ -1289,9 +1289,10 @@ AS_IF([test "x$HAVE_SYSTEMD" = "x1"], AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd system service files]), - [systemdsystemunitdir=$withval], [systemdsystemunitdir="${libdir}/systemd/system"]) - -AC_SUBST(systemdsystemunitdir) + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +if test "x$with_systemdsystemunitdir" != xno; then + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +fi AC_ARG_WITH([systemduserunitdir], AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]), @@ -1557,7 +1558,7 @@ AC_CONFIG_FILES([src/system.pa:src/daemon/system.pa.in], [m4 src/system.pa > src/system.pa.gen && mv src/system.pa.gen src/system.pa]) AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"], [ - AC_CONFIG_FILES([src/pulseaudio.service:src/daemon/systemd/user/pulseaudio.service.in]) + AC_CONFIG_FILES([src/daemon/systemd/user/pulseaudio.service:src/daemon/systemd/user/pulseaudio.service.in]) AC_CONFIG_FILES([src/daemon/systemd/system/pulseaudio.service:src/daemon/systemd/system/pulseaudio.service.in]) ]) diff --git a/packaging/pulseaudio.spec b/packaging/pulseaudio.spec index 77a5893..68badbe 100644 --- a/packaging/pulseaudio.spec +++ b/packaging/pulseaudio.spec @@ -427,9 +427,9 @@ fi %{_libdir}/pulse-%{version}/modules/module-role-ducking.so %{_libdir}/pulse-%{version}/modules/module-systemd-login.so %{_unitdir_user}/pulseaudio.service +%{_unitdir_user}/pulseaudio.socket %{_unitdir}/pulseaudio.service %{_unitdir}/multi-user.target.wants/pulseaudio.service -%{_unitdir_user}/pulseaudio.socket %if %{with pulseaudio_samsung_policy} %{_libdir}/pulse-%{version}/modules/module-policy.so %endif @@ -541,8 +541,8 @@ fi %files cascaded-setup %config(noreplace) %{_sysconfdir}/pulse/cascaded.pa %config(noreplace) %{_sysconfdir}/pulse/tunnel-manager.conf -%{_libdir}/systemd/system/pulseaudio.service -%{_libdir}/systemd/system/pulseaudio.socket +%{_unitdir}/pulseaudio.service +%{_unitdir}/pulseaudio.socket %files module-devel %manifest %{name}.manifest diff --git a/src/Makefile.am b/src/Makefile.am index 2e7af09..795b1d1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -258,7 +258,7 @@ systemdsystemunit_DATA = \ daemon/systemd/system/pulseaudio.socket systemduserunit_DATA = \ - pulseaudio.service \ + daemon/systemd/user/pulseaudio.service \ daemon/systemd/user/pulseaudio.socket endif -- 2.7.4