%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: accerciser Version: 3.42.0 Release: %mkrel 2 Summary: Interactive Python accessibility explorer for the GNOME desktop License: BSD Group: Accessibility URL: https://wiki.gnome.org/Apps/Accerciser Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz BuildArch: noarch BuildRequires: pkgconfig(atspi-2) >= 2.1.5 BuildRequires: pkgconfig(gtk+-3.0) >= 3.1.13 BuildRequires: pkgconfig(pygobject-3.0) >= 2.90.3 BuildRequires: gettext BuildRequires: itstool BuildRequires: make BuildRequires: libxml2-utils BuildRequires: yelp-tools BuildRequires: pkgconfig(python3) Requires: python3dist(pygobject) %description Accerciser is an interactive Python accessibility explorer for the GNOME desktop. It uses AT-SPI to inspect and control widgets, allowing you to check if an application is providing correct information to assistive technologies and automated test frameworks. Accerciser has a simple plugin framework which you can use to create custom views of accessibility information. %prep %autosetup -p1 %build export PYTHON=%{python3} %configure --build=%{_host} %make_build %install %make_install %find_lang accerciser --with-gnome %files -f accerciser.lang %doc AUTHORS NEWS README.md %{_bindir}/accerciser %{python3_sitelib}/accerciser/ %{_datadir}/accerciser/ %{_datadir}/applications/accerciser.desktop %{_datadir}/glib-2.0/schemas/org.a11y.Accerciser.gschema.xml %{_datadir}/icons/hicolor/*/apps/%{name}*.* %{_metainfodir}/*.appdata.xml %{_mandir}/man1/accerciser.1*