Commit bffc52a3 authored by Lennart Poettering's avatar Lennart Poettering

systemd: install systemd socket and service file by default

parent 8e3060a2
......@@ -2,7 +2,7 @@ SUBDIRS=dbus bus doc tools test
DIST_SUBDIRS=dbus bus doc tools test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dbus-1.pc
pkgconfig_DATA = dbus-1.pc
DISTCLEANFILES = \
dbus-1.pc
......@@ -61,3 +61,6 @@ endif
update-authors:
git shortlog -s -e | cut -c 8- | sort > AUTHORS
DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
......@@ -21,3 +21,5 @@ system.conf
dbus-daemon.1
bus-test-launch-helper
bus-test-system
dbus.service
dbus.socket
......@@ -74,7 +74,7 @@ BUS_SOURCES= \
dbus_daemon_SOURCES= \
$(BUS_SOURCES) \
main.c
main.c
dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_LDADD= \
......@@ -151,7 +151,7 @@ extra_inst_programs+=dbus-daemon
endif
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to
## so if adding tests not to be run in make check, don't add them to
## TESTS
if DBUS_BUILD_TESTS
TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
......@@ -160,7 +160,7 @@ else
TESTS=
endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs)
bin_PROGRAMS=$(extra_inst_programs)
......@@ -219,6 +219,11 @@ if DBUS_UNIX
fi \
fi
endif
if HAVE_SYSTEMD
# Install dbus.socket as default implementation of a D-Bus stack
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
$(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
endif
#### Init scripts fun
SCRIPT_IN_FILES=messagebus.in \
......@@ -246,9 +251,19 @@ initd_SCRIPTS= \
endif
## Slackware end
if HAVE_SYSTEMD
SCRIPT_IN_FILES += \
dbus.service.in \
dbus.socket.in
systemdsystemunit_DATA = \
dbus.service \
dbus.socket
endif
MAN_IN_FILES=dbus-daemon.1.in
man_MANS = dbus-daemon.1
#### Extra dist
#### Extra dist
EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)
[Unit]
Description=D-Bus System Message Bus
Requires=dbus.socket
After=syslog.target
[Service]
ExecStartPre=@EXPANDED_BINDIR@/dbus-uuidgen --ensure
ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --systemd-activation
ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
[Install]
WantedBy=multi-user.target
Also=dbus.socket
[Socket]
ListenStream=@DBUS_SYSTEM_SOCKET@
[Install]
WantedBy=sockets.target
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment