File zapzap.spec of Package zapzap
%define _name com.rtosta.zapzap
Name: zapzap
Version: 6.0.1.8
Release: 0
Summary: Whatsapp Desktop for Linux
License: GPL-3.0-only+
URL: https://github.com/rafatosta/zapzap
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
BuildRequires: %{python_module PyQt6}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
Requires: python3-PyQt6-WebEngine
Requires: python3-PyQt6-sip
Requires: python3-dbus-python
BuildArch: noarch
%description
WhatsApp desktop application written in Pyqt6 + PyQt6-WebEngine for Linux.
%prep
%autosetup -n %{name}-%{version}
%build
%py3_build
%install
%py3_install
install -d %{buildroot}%{_datadir}/{applications,metainfo}
install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -Dm664 share/applications/%{_name}.desktop %{buildroot}%{_datadir}/applications/%{_name}.desktop
install -Dm664 share/metainfo/%{_name}.appdata.xml %{buildroot}%{_datadir}/metainfo/%{_name}.appdata.xml
install -Dm644 share/icons/%{_name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{_name}.svg
%fdupes %{buildroot}%{python_sitelib}/%{name}
%check
%files
%license LICENSE
%doc README.md
%{python_sitelib}/%{name}-*.egg-info
%{python_sitelib}/%{name}/
%{_bindir}/%{name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/metainfo/%{_name}.appdata.xml
%{_datadir}/icons/hicolor/scalable/apps/%{_name}.svg
# Language files (could be scripted, but is short)
%lang(bs) %{python_sitelib}/%{name}/po/bs
%lang(de) %{python_sitelib}/%{name}/po/de
%lang(es) %{python_sitelib}/%{name}/po/es
%lang(fr) %{python_sitelib}/%{name}/po/fr
%lang(it) %{python_sitelib}/%{name}/po/it
%lang(nl) %{python_sitelib}/%{name}/po/nl
%lang(pt) %{python_sitelib}/%{name}/po/pt
%lang(pt_BR) %{python_sitelib}/%{name}/po/pt_BR
%lang(ru_RU) %{python_sitelib}/%{name}/po/ru_RU
%lang(tr) %{python_sitelib}/%{name}/po/tr
%changelog