## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 3;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global __provides_exclude_from ^%{_qt6_plugindir}/.*\\.so$

Name: qt-jdenticon
Version: 0.3.1
Release: %autorelease

License: MIT
Summary: Jdenticon Qt5 plugin
URL: https://github.com/Nheko-Reborn/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
%if 0%{?fedora} && 0%{?fedora} >= 42
ExcludeArch: %{ix86}
%endif

BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: qt6-qtbase-devel

%description
Special Qt/C++14 port of Jdenticon distributed as a Qt plugin.

The eventual plan for this is that it will be made into a Qt library that can
be used in other applications with a command-line application for use as a
standalone generator.

%prep
%autosetup -p1

%build
%qmake_qt6 QtIdenticon.pro
%make_build

%install
%make_install INSTALL_ROOT=%{buildroot}

%if 0%{?flatpak}
# qtbase is part of runtime in /usr, this is built in /app
mv %{buildroot}/usr %{buildroot}/app
%endif

%files
%doc README.md
%license LICENSE
%{_qt6_plugindir}/libqtjdenticon.so

%changelog
## START: Generated by rpmautospec
* Mon Dec 16 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.3.1-3
- Drop i686 support (leaf package)

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Wed Jun 12 2024 Vitaly <vitaly@easycoding.org> - 0.3.1-1
- Updated to version 0.3.1 and switched to Qt 6.

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

## END: Generated by rpmautospec