%define url_ver %{lua: ver = rpm.expand("%{version}"); majmin, count1 = string.gsub(ver, "^([0123456789]+%.[0123456789]+).*", "%1", 1); if count1 == 0 then print(ver); return; end; maj, count2 = string.gsub(majmin, "^([0123456789]+).*", "%1", 1); if count2 == 0 then print(majmin) elseif tonumber(majmin) < 40 then print(majmin) else print(maj) end} %global gtk4_version 4.4.0 %global libadwaita_version 1.4.0 Name: baobab Version: 46.0 Release: %mkrel 1 Summary: Disk Usage Analyzer (aka Baobab) License: GPLv2+ Group: File tools Url: https://wiki.gnome.org/GnomeUtils/Baobab Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz BuildRequires: itstool BuildRequires: intltool BuildRequires: pkgconfig(gnome-doc-utils) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: pkgconfig(libadwaita-1) >= %{libadwaita_version} BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libgtop-2.0) BuildRequires: vala BuildRequires: meson %description Disk Usage Analyzer is is a graphical, menu-driven application to analyze disk usage in any Gnome environment. Disk Usage Analyzer can easily scan either the whole file-system tree, or a specific user-requested directory branch (local or remote). It also auto-detects in real-time any changes made to your home directory as far as any mounted/unmounted device. Disk Usage Analyzer also provides a full graphical tree-map window for each selected folder. %prep %setup -q %build %meson %meson_build %install %meson_install #we don't want these find %{buildroot} -name '*.la' -delete %find_lang %{name} --with-gnome %check %meson_test %files -f %{name}.lang %doc README.md NEWS AUTHORS %{_bindir}/%{name} %{_datadir}/glib-2.0/schemas/org.gnome.%{name}.gschema.xml %{_datadir}/applications/org.gnome.%{name}.desktop %{_datadir}/dbus-1/services/org.gnome.%{name}.service %{_datadir}/icons/*/*/apps/org.gnome.baobab*.* %{_metainfodir}/org.gnome.baobab.appdata.xml %{_mandir}/man1/%{name}.1*