contrib/rpm: install D-Bus service files to /usr if we can

This is in fact the correct location, but dbus in RHEL 7 is still too
old to be able to use that.
This commit is contained in:
Lubomir Rintel
2017-03-02 09:48:13 +01:00
parent 9d39569287
commit ef8c292881

View File

@@ -7,7 +7,6 @@
# Note that it contains __PLACEHOLDERS__ that will be replaced by the accompanying 'build.sh' script. # Note that it contains __PLACEHOLDERS__ that will be replaced by the accompanying 'build.sh' script.
%global dbus_version 1.1
%global dbus_glib_version 0.100 %global dbus_glib_version 0.100
%global wireless_tools_version 1:28-0pre9 %global wireless_tools_version 1:28-0pre9
@@ -48,6 +47,14 @@
%global default_with_bluetooth 1 %global default_with_bluetooth 1
%global default_with_wwan 1 %global default_with_wwan 1
%if (0%{?fedora} && 0%{?fedora} < 23)
%global dbus_version 1.1
%global dbus_sys_dir %{_sysconfdir}/dbus-1/system.d
%else
%global dbus_version 1.9.18
%global dbus_sys_dir %{_datadir}/dbus-1/system.d
%endif
# ModemManager on Fedora < 20 too old for Bluetooth && wwan # ModemManager on Fedora < 20 too old for Bluetooth && wwan
%if (0%{?fedora} && 0%{?fedora} < 20) %if (0%{?fedora} && 0%{?fedora} < 20)
%global default_with_bluetooth 0 %global default_with_bluetooth 0
@@ -429,6 +436,7 @@ intltoolize --automake --copy --force
--with-suspend-resume=systemd \ --with-suspend-resume=systemd \
--with-systemdsystemunitdir=%{systemd_dir} \ --with-systemdsystemunitdir=%{systemd_dir} \
--with-system-ca-path=/etc/pki/tls/cert.pem \ --with-system-ca-path=/etc/pki/tls/cert.pem \
--with-dbus-sys-dir=%{dbus_sys_dir} \
--with-tests=yes \ --with-tests=yes \
--with-valgrind=no \ --with-valgrind=no \
--enable-ifcfg-rh=yes \ --enable-ifcfg-rh=yes \
@@ -509,9 +517,9 @@ fi
%files %files
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.NetworkManager.conf %{dbus_sys_dir}/org.freedesktop.NetworkManager.conf
%{_sysconfdir}/dbus-1/system.d/nm-dispatcher.conf %{dbus_sys_dir}/nm-dispatcher.conf
%{_sysconfdir}/dbus-1/system.d/nm-ifcfg-rh.conf %{dbus_sys_dir}/nm-ifcfg-rh.conf
%{_sbindir}/%{name} %{_sbindir}/%{name}
%{_bindir}/nmcli %{_bindir}/nmcli
%{_datadir}/bash-completion/completions/nmcli %{_datadir}/bash-completion/completions/nmcli