From 5a2fda0be9f398b11478bfac9292dd57b739e007 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 9 Dec 2012 11:19:53 +0100 Subject: [PATCH] build: Use libexecdir for Bluetooth daemon --- Makefile.am | 13 ++++++++++--- bootstrap-configure | 1 - configure.ac | 2 +- src/bluetooth.service.in | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index a6afcac4f..34ee44269 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,8 +9,6 @@ noinst_LTLIBRARIES = bin_PROGRAMS = -sbin_PROGRAMS = - libexec_PROGRAMS = noinst_PROGRAMS = @@ -52,6 +50,8 @@ systemdunit_DATA = src/bluetooth.service endif endif +EXTRA_DIST += src/bluetooth.service.in + plugindir = $(libdir)/bluetooth/plugins if MAINTAINER_MODE @@ -131,7 +131,7 @@ plugins_external_dummy_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version \ plugins_external_dummy_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden endif -sbin_PROGRAMS += src/bluetoothd +libexec_PROGRAMS += src/bluetoothd src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \ $(attrib_sources) $(btio_sources) \ @@ -263,6 +263,13 @@ MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 configure config.h.in config.sub config.guess \ ltmain.sh depcomp compile missing install-sh mkinstalldirs +SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(SED) -e 's,@libexecdir\@,$(libexecdir),g' \ + < $< > $@ + +%.service: %.service.in Makefile + $(SED_PROCESS) + src/builtin.h: src/genbuiltin $(builtin_sources) $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@ diff --git a/bootstrap-configure b/bootstrap-configure index 6735b3a19..d70fead45 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -15,7 +15,6 @@ fi --mandir=/usr/share/man \ --sysconfdir=/etc \ --localstatedir=/var \ - --libexecdir=/lib \ --enable-health \ --enable-tools \ --enable-hid2hci \ diff --git a/configure.ac b/configure.ac index 429297843..0fc5c6506 100644 --- a/configure.ac +++ b/configure.ac @@ -54,4 +54,4 @@ if (test -n "${path_systemdunit}"); then fi AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}") -AC_OUTPUT(Makefile doc/version.xml src/bluetoothd.8 src/bluetooth.service bluez.pc) +AC_OUTPUT(Makefile doc/version.xml src/bluetoothd.8 bluez.pc) diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in index a8442a9ed..a3c54874e 100644 --- a/src/bluetooth.service.in +++ b/src/bluetooth.service.in @@ -4,7 +4,7 @@ Description=Bluetooth service [Service] Type=dbus BusName=org.bluez -ExecStart=@prefix@/sbin/bluetoothd -n +ExecStart=@libexecdir@/bluetoothd -n StandardOutput=null [Install] -- 2.47.3