Calculate the major_version rather than hardcoding it

Saves us from having to change the version in multiple places.
This commit is contained in:
Bastien Nocera 2021-08-30 10:41:31 +02:00
parent f929ca636c
commit c62ce15b0a

View File

@ -8,6 +8,7 @@
%global geoclue_version 2.3.1
%global tarball_version %%(echo %{version} | tr '~' '.')
%global major_version %%(echo %{version} | cut -f 1 -d '~' | cut -f 1 -d '.')
Name: gnome-settings-daemon
Version: 40.0.1
@ -16,7 +17,7 @@ Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
License: GPLv2+
URL: https://download.gnome.org/sources/%{name}
Source0: https://download.gnome.org/sources/%{name}/40/%{name}-%{tarball_version}.tar.xz
Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz
Source1: org.gnome.settings-daemon.plugins.power.gschema.override
BuildRequires: meson >= 0.44.0
@ -167,8 +168,8 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas
%{_libexecdir}/gsd-wwan
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.wwan.gschema.xml
%dir %{_libdir}/gnome-settings-daemon-40
%{_libdir}/gnome-settings-daemon-40/libgsd.so
%dir %{_libdir}/gnome-settings-daemon-%{major_version}
%{_libdir}/gnome-settings-daemon-%{major_version}/libgsd.so
%{_sysconfdir}/xdg/Xwayland-session.d/00-xrdb
%{_userunitdir}/*
@ -180,7 +181,7 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gschema.xml
%files devel
%{_includedir}/gnome-settings-daemon-40
%{_includedir}/gnome-settings-daemon-%{major_version}
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog