%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} Name: zenity Summary: Call GNOME dialog boxes from the command line Version: 4.0.1 Release: %mkrel 1 License: LGPLv2+ Group: Development/GNOME and GTK+ URL: https://download.gnome.org/sources/zenity Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz BuildRequires: gnome-common BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libadwaita-1) >= 1.2 BuildRequires: pkgconfig(webkitgtk-6.0) BuildRequires: pkgconfig(x11) BuildRequires: help2man BuildRequires: desktop-file-utils BuildRequires: itstool BuildRequires: libxslt-proc BuildRequires: libxml2-utils BuildRequires: meson BuildRequires: yelp-tools BuildRequires: x11-server-xvfb Conflicts: gnome-utils < 2.3.3 Provides: xmsg-dialog %description Zenity allows you to display dialog boxes from the command-line and shell scripts. %prep %autosetup -p1 %build %meson -Dwebkitgtk=true # Man page generation requires running the in-tree zenity command. %{shrink:xvfb-run -w 10 -d %meson_build} %install %meson_install %find_lang %{name}-0.1 --with-gnome --all-name %files -f %name-0.1.lang %license COPYING %doc AUTHORS NEWS README.md %{_bindir}/* %{_datadir}/applications/org.gnome.Zenity.desktop %{_datadir}/icons/hicolor/48*48/apps/zenity.png %{_mandir}/man1/*