#!/usr/bin/env bash # Static libdbus, so the viewer links D-Bus in rather than pulling libdbus-1.so.3 -- and with it # libsystemd and libselinux -- at runtime. The viewer is a pure session-bus client, so the daemon-side # systemd/selinux features are off; built -fPIC so the archive links into Qt's PIE tools. # # Shared by all four build images (docker/*/Dockerfile). The build context is docker/, so each # Dockerfile reaches this with COPY common/. Version inputs come from that Dockerfile's ARGs. set -eux; \ cd /tmp; \ curl -LO https://dbus.freedesktop.org/releases/dbus/dbus-${DBUS_VERSION}.tar.xz; \ tar -xf dbus-${DBUS_VERSION}.tar.xz; \ cd dbus-${DBUS_VERSION}; \ ./configure --prefix=/opt/dbus-${DBUS_VERSION}-static \ --enable-static --disable-shared --with-pic \ --disable-systemd --without-systemdsystemunitdir \ --disable-selinux --disable-apparmor --disable-libaudit \ --disable-tests --disable-asserts \ --disable-doxygen-docs --disable-xml-docs --disable-ducktype-docs \ CFLAGS="-fPIC"; \ make -j"$(nproc)"; \ make install; \ cd /; rm -rf /tmp/dbus-${DBUS_VERSION} /tmp/dbus-${DBUS_VERSION}.tar.xz