Name:          webapp-manager
Version:       1.3.9

%global forgeurl https://github.com/linuxmint/%{name}
%global commit 42b6d42aa1373598675297723014e7056539bb67
%global date 20241216
%forgemeta

Release:       1%{?dist}
License:       GPLv3+
Summary:       Web Application Manager

URL:           %{forgeurl}
Source:        %{forgesource}

BuildRequires: gettext
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: python3-rpm-macros

Requires:      python3-beautifulsoup4
Requires:      python3-configobj
Requires:      python3-gobject
Requires:      python3-pillow
Requires:      python3-setproctitle
Requires:      python3-tldextract
Requires:      xapps

BuildArch:     noarch

%description
Launch websites as if they were apps.

%files
%{_bindir}/%{name}
%{_prefix}/lib/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/kde4/%{name}.desktop
%{_datadir}/desktop-directories/webapps-webapps.directory
%{_datadir}/glib-2.0/schemas/org.x.%{name}.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/icons/hicolor/scalable/categories/applications-webapps.svg
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
%{_datadir}/%{name}/
%{_sysconfdir}/xdg/menus/applications-merged/webapps.menu

#------------------------------------------------------------------

%prep
%forgeautosetup -p1
sed -i "s/__DEB_VERSION__/%{version}/g" usr/lib/%{name}/%{name}.py

%build
%make_build

%install
mkdir -p %{buildroot}

cp -r etc %{buildroot}
cp -r usr %{buildroot}

%py_byte_compile %{python3} %{buildroot}%{_prefix}/lib/%{name}/*.py

#------------------------------------------------------------------

%changelog
* Sun Dec 22 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.3.9-1
- Update to 1.3.9

* Sun Nov 10 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.3.7-4
- Fix patch

* Sun Nov 3 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.3.7-3
- Add support for ungoogled-chromium

* Wed Oct 16 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.3.7-2
- Fedora 41 Mass Rebuild

* Tue Jul 30 2024 Hazel Bunny <hazel_bunny@disroot.org> - 1.3.7-1
- Update to 1.3.7

* Fri Jun 7 2024 Hazel Bunny <hazel_bunny@disroot.org> 1.3.5-1
- Update to 1.3.5

* Wed Mar 6 2024 Hazel Bunny <hazel_bunny@disroot.org> 1.3.4-1
- Update to 1.3.4

* Sun Jul 9 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.3.2-2
- Comply to fedora python packaging guidelines

* Sun Jun 25 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.3.2-1
- Bump version
- Fix app version in about screen

* Thu Jun 15 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.3.0-2
- Bump version
- Fix app entry in kickoff

* Fri Jun 9 2023 Hazel Bunny <hazel_bunny@disroot.org> 1.1.5-1
- Import from github:refi64/webapp-manager-fedora