mirror of
https://abf.rosa.ru/djam/bluez.git
synced 2025-02-23 15:12:52 +00:00
92 lines
3 KiB
Diff
92 lines
3 KiB
Diff
--- bluez-4.93/Makefile.am.systemd 2011-05-03 10:20:36.000000000 +0200
|
|
+++ bluez-4.93/Makefile.am 2011-05-16 10:44:20.000000000 +0200
|
|
@@ -352,7 +352,8 @@
|
|
CLEANFILES += $(rules_DATA)
|
|
|
|
EXTRA_DIST += scripts/bluetooth.rules \
|
|
- scripts/bluetooth-hid2hci.rules scripts/bluetooth-serial.rules
|
|
+ scripts/bluetooth-hid2hci.rules scripts/bluetooth-serial.rules \
|
|
+ scripts/bluetooth.service.in scripts/org.bluez.service
|
|
|
|
if PCMCIA
|
|
udevdir = $(libexecdir)/udev
|
|
@@ -360,6 +361,27 @@
|
|
dist_udev_SCRIPTS = scripts/bluetooth_serial
|
|
endif
|
|
|
|
+if HAVE_SYSTEMD
|
|
+systemdsystemunit_DATA = \
|
|
+ scripts/bluetooth.service
|
|
+
|
|
+scripts/bluetooth.service: scripts/bluetooth.service.in
|
|
+ @$(SED) -e "s|\@sbindir\@|$(sbindir)|" $< >$@
|
|
+
|
|
+dbussystemservicesdir = $(datadir)/dbus-1/system-services
|
|
+
|
|
+dbussystemservices_DATA = \
|
|
+ scripts/org.bluez.service
|
|
+
|
|
+endif
|
|
+
|
|
+install-data-hook:
|
|
+if HAVE_SYSTEMD
|
|
+ $(MKDIR_P) $(DESTDIR)$(systemdsystemunitdir)/bluetooth.target.wants
|
|
+ ( cd $(DESTDIR)$(systemdsystemunitdir)/bluetooth.target.wants && \
|
|
+ $(LN_S) ../bluetooth.service bluetooth.service )
|
|
+endif
|
|
+
|
|
EXTRA_DIST += doc/manager-api.txt \
|
|
doc/adapter-api.txt doc/device-api.txt \
|
|
doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
|
|
@@ -385,9 +407,9 @@
|
|
|
|
pkgconfig_DATA = bluez.pc
|
|
|
|
-DISTCHECK_CONFIGURE_FLAGS = --disable-udevrules
|
|
+DISTCHECK_CONFIGURE_FLAGS = --disable-udevrules --with-systemdsystemunitdir=
|
|
|
|
-DISTCLEANFILES = $(pkgconfig_DATA)
|
|
+DISTCLEANFILES = $(pkgconfig_DATA) scripts/bluetooth.service
|
|
|
|
MAINTAINERCLEANFILES = Makefile.in \
|
|
aclocal.m4 configure config.h.in config.sub config.guess \
|
|
--- bluez-4.93/configure.ac.systemd 2011-05-03 10:20:36.000000000 +0200
|
|
+++ bluez-4.93/configure.ac 2011-05-16 10:40:24.000000000 +0200
|
|
@@ -57,5 +57,14 @@
|
|
AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
|
|
fi
|
|
|
|
+# systemd
|
|
+
|
|
+AC_ARG_WITH([systemdsystemunitdir],
|
|
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
|
+ [],
|
|
+ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
|
|
+AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
|
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
|
|
+
|
|
AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
|
|
src/bluetoothd.8 bluez.pc)
|
|
--- bluez-4.93/scripts/.gitignore.systemd 2011-05-16 10:40:24.000000000 +0200
|
|
+++ bluez-4.93/scripts/.gitignore 2011-05-16 10:40:24.000000000 +0200
|
|
@@ -0,0 +1 @@
|
|
+bluetooth.service
|
|
--- bluez-4.93/scripts/bluetooth.service.in.systemd 2011-05-16 10:40:24.000000000 +0200
|
|
+++ bluez-4.93/scripts/bluetooth.service.in 2011-05-16 10:40:24.000000000 +0200
|
|
@@ -0,0 +1,8 @@
|
|
+[Unit]
|
|
+Description=Bluetooth Manager
|
|
+After=syslog.target
|
|
+
|
|
+[Service]
|
|
+Type=dbus
|
|
+BusName=org.bluez
|
|
+ExecStart=@sbindir@/bluetoothd -n
|
|
--- bluez-4.93/scripts/org.bluez.service.systemd 2011-05-16 10:40:24.000000000 +0200
|
|
+++ bluez-4.93/scripts/org.bluez.service 2011-05-16 10:40:24.000000000 +0200
|
|
@@ -0,0 +1,5 @@
|
|
+[D-BUS Service]
|
|
+Name=org.bluez
|
|
+Exec=/bin/false
|
|
+User=root
|
|
+SystemdService=bluetooth.service
|