OSDN Git Service

build: Use libexecdir for Bluetooth daemon
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 9 Dec 2012 10:19:53 +0000 (11:19 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 9 Dec 2012 10:19:53 +0000 (11:19 +0100)
Makefile.am
bootstrap-configure
configure.ac
src/bluetooth.service.in

index a6afcac..34ee442 100644 (file)
@@ -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) > $@
 
index 6735b3a..d70fead 100755 (executable)
@@ -15,7 +15,6 @@ fi
                --mandir=/usr/share/man \
                --sysconfdir=/etc \
                --localstatedir=/var \
-               --libexecdir=/lib \
                --enable-health \
                --enable-tools \
                --enable-hid2hci \
index 4292978..0fc5c65 100644 (file)
@@ -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)
index a8442a9..a3c5487 100644 (file)
@@ -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]