%bcond_without qt6
%bcond_with clang

Name:           arqiver
Version:        1.0.0
Release:        1%{dist}
Summary:        A simple Qt archive manager
Group:          Archiving/Other
License:        GPLv3
URL:            https://github.com/tsujan/Arqiver
Source:         https://github.com/tsujan/Arqiver/releases/download/V%{version}/Arqiver-%{version}.tar.xz

BuildRequires:  cmake
%if %{with clang}
BuildRequires: clang >= 15.0
%else
BuildRequires: gcc-c++
%endif
%if %{without qt6}
BuildRequires:  qt5-qttools
BuildRequires:  cmake(Qt5Core) >= 5.15
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Svg)
BuildRequires:  cmake(Qt5DBus)
%else
BuildRequires:  cmake(Qt6Core) >= 6.6.0
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  cmake(Qt6Svg)
BuildRequires:  cmake(Qt6DBus)
%endif
Requires:       bsdtar
Requires:       gzip
Requires:       p7zip

%description
A simple and desktop-agnostic Qt file archiver
LXQt Archiver is derived from the following programs:
* Engrampa of MATE desktop
* File Roller of Gnome desktop

%prep
%autosetup -p1 -n Arqiver-%{version}

%build
%if %{with clang}
export CC=clang
export CXX=clang++
%endif

%cmake \
%if %{with qt6}
    -DENABLE_QT5=OFF
%endif

%cmake_build

%install
%cmake_install

%files
%doc README.md ChangeLog
%{_bindir}/%{name}
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/

%changelog
* Mon Nov 11 2024 Raven <raven@sysadmins.ws> - 1.0.0-1
- update to 1.0.0

* Fri May 17 2024 Raven <raven@sysadmins.ws> - 0.12.0-2
- rebuilt for new qt6

* Wed Dec 20 2023 Raven <raven@sysadmins.ws> - 0.12.0-1
- update to 0.12.0

* Tue Nov  7 2023 Raven <raven@sysadmins.ws> - 0.11.0-1
- initial build