mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-31 18:10:11 +01:00
Install dbus-daemon and dbus-daemon-launch-helper in the conventional way
Also remove some pointless indirection (extra_tests etc.), don't install the unused directory $(libexecdir)/dbus-1 (we actually install the launch helper directly into $(libexecdir)), and allow dbus_daemondir to be set on Windows rather than forcing dbus-daemon to be installed to $(bindir) there. dbus_daemon_execdir has to contain "exec" so that the dbus-daemon will be installed by "make install-exec" and not "make install-data". Bug: https://bugs.freedesktop.org/show_bug.cgi?id=14512 Reviewed-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
59c6663293
commit
b0acdedae1
1 changed files with 27 additions and 41 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
configdir=$(sysconfdir)/dbus-1
|
configdir=$(sysconfdir)/dbus-1
|
||||||
|
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
|
||||||
|
|
||||||
INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
|
INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
|
||||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||||
|
|
@ -145,31 +145,28 @@ bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
|
||||||
-DACTIVATION_LAUNCHER_TEST \
|
-DACTIVATION_LAUNCHER_TEST \
|
||||||
-DACTIVATION_LAUNCHER_DO_OOM
|
-DACTIVATION_LAUNCHER_DO_OOM
|
||||||
|
|
||||||
extra_tests=
|
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
|
||||||
extra_noinst_programs=
|
## even when not doing "make check"
|
||||||
extra_inst_programs=
|
noinst_PROGRAMS = $(TESTS)
|
||||||
if DBUS_UNIX
|
dbus_daemon_exec_PROGRAMS = dbus-daemon
|
||||||
extra_tests+=bus-test-launch-helper
|
libexec_PROGRAMS = dbus-daemon-launch-helper
|
||||||
extra_noinst_programs+=dbus-daemon-launch-helper dbus-daemon-launch-helper-test dbus-daemon
|
|
||||||
endif
|
|
||||||
if DBUS_WIN
|
|
||||||
extra_inst_programs+=dbus-daemon
|
|
||||||
endif
|
|
||||||
|
|
||||||
## note that TESTS has special meaning (stuff to use in make check)
|
## 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
|
## TESTS
|
||||||
|
TESTS =
|
||||||
|
|
||||||
if DBUS_BUILD_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
|
TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
|
||||||
TESTS=bus-test bus-test-system $(extra_tests)
|
TESTS += bus-test bus-test-system
|
||||||
else
|
|
||||||
TESTS=
|
|
||||||
endif
|
|
||||||
|
|
||||||
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
|
if DBUS_UNIX
|
||||||
## even when not doing "make check"
|
TESTS += bus-test-launch-helper
|
||||||
noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs)
|
# this is used by the tests but is not,itself, a test
|
||||||
bin_PROGRAMS=$(extra_inst_programs)
|
noinst_PROGRAMS += dbus-daemon-launch-helper-test
|
||||||
|
endif DBUS_UNIX
|
||||||
|
|
||||||
|
endif DBUS_BUILD_TESTS
|
||||||
|
|
||||||
bus_test_system_SOURCES= \
|
bus_test_system_SOURCES= \
|
||||||
$(XML_SOURCES) \
|
$(XML_SOURCES) \
|
||||||
|
|
@ -197,34 +194,12 @@ bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
|
||||||
clean-local:
|
clean-local:
|
||||||
/bin/rm *.bb *.bbg *.da *.gcov || true
|
/bin/rm *.bb *.bbg *.da *.gcov || true
|
||||||
|
|
||||||
uninstall-hook:
|
|
||||||
rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT)
|
|
||||||
rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT)
|
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
||||||
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
||||||
$(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
|
$(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
|
||||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
||||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
|
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
|
||||||
if DBUS_UNIX
|
|
||||||
if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
|
|
||||||
chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
|
|
||||||
fi
|
|
||||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR)
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
|
|
||||||
if test -f dbus-daemon-launch-helper$(EXEEXT) ; then \
|
|
||||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon-launch-helper$(EXEEXT) $(DESTDIR)$(libexecdir); \
|
|
||||||
if test `id -u` -eq 0; then \
|
|
||||||
chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
|
||||||
chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
|
||||||
else \
|
|
||||||
echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
|
|
||||||
echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
|
|
||||||
fi \
|
|
||||||
fi
|
|
||||||
endif
|
|
||||||
if HAVE_SYSTEMD
|
if HAVE_SYSTEMD
|
||||||
# Install dbus.socket as default implementation of a D-Bus stack
|
# Install dbus.socket as default implementation of a D-Bus stack
|
||||||
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
|
$(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
|
||||||
|
|
@ -236,6 +211,17 @@ if HAVE_SYSTEMD
|
||||||
$(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
|
$(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if DBUS_UNIX
|
||||||
|
install-exec-hook:
|
||||||
|
if test `id -u` -eq 0; then \
|
||||||
|
chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
||||||
|
chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
|
||||||
|
else \
|
||||||
|
echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
|
||||||
|
echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
#### Init scripts fun
|
#### Init scripts fun
|
||||||
SCRIPT_IN_FILES=messagebus.in \
|
SCRIPT_IN_FILES=messagebus.in \
|
||||||
messagebus-config.in \
|
messagebus-config.in \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue