File qtox.spec of Package qtox

#
# spec file for package qtox
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           qtox
Version:        1.18.3
Release:        0
Summary:        Tox client
License:        GPL-3.0-only
Group:          Productivity/Networking/Instant Messenger
URL:            https://qtox.github.io/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.10
BuildRequires:  hicolor-icon-theme
BuildRequires:  qt6-base-devel >= 6.2.0
BuildRequires:  pkgconfig(libavdevice) >= 2.6.0
BuildRequires:  pkgconfig(libavcodec) >= 2.6.0
BuildRequires:  pkgconfig(libexif)
BuildRequires:  pkgconfig(libqrencode) >= 3.0.3
BuildRequires:  pkgconfig(openal) >= 1.16.0
BuildRequires:  pkgconfig(sqlcipher) >= 3.2.0
BuildRequires:  pkgconfig(toxcore) >= 0.2.20
BuildRequires:  pkgconfig(Qt6Linguist)
BuildRequires:  pkgconfig(Qt6Svg)

%description
Powerful Tox client that tries to follow the Tox UI mockup while running on all major systems.

%prep
%setup -q

%build
%cmake -DUPDATE_CHECK=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
%cmake_build
%{__strip} -s %{name}

%install
%cmake_install
# remove non-standard dimensions
rm -rf %{buildroot}%{_datadir}/icons/hicolor/14x14
# fix desktop-file-name
mv %{buildroot}%{_datadir}/applications/io.github.qtox.qTox.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop

%check
%ctest --exclude-regex test_bsu

%if 0%{?suse_version} && 0%{?suse_version} < 1500
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%files
%defattr(-,root,root)
%attr(755,root,root) %{_bindir}/%{name}
%{_datadir}/metainfo
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%doc README.md CHANGELOG.md CONTRIBUTING.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by