Name: dove-flatpak
Version: 202503051
Release: 1%{?dist}
Summary: Dove is a suite of configurations & advanced modifications for Mozilla Thunderbird, designed to put the user first - with a focus on privacy, security, freedom, & usability.
License: GPL-3.0-or-later+
URL: https://dove.celenity.dev
Source0: https://codeberg.org/celenity/Dove/raw/commit/89e6de34b8e1897d3bc980b0bfca7c751210c2db/archives/dove.zip
BuildArch: noarch

BuildRequires: unzip

%description
Dove is a suite of configurations & advanced modifications for Mozilla Thunderbird, designed to put the user first - with a focus on privacy, security, freedom, & usability.

https://dove.celenity.dev

%prep
mkdir -p %{_tmppath}/dove
unzip -o %{SOURCE0} -d %{_tmppath}/dove

%install
mkdir -p %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/defaults/pref
mkdir -p %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/policies
mkdir -p %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/lib/thunderbird
mkdir -p %{buildroot}/usr/share/doc/dove-flatpak

install -m 644 %{_tmppath}/dove/dove.cfg %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/lib/thunderbird/
install -m 644 %{_tmppath}/dove/policies.json %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/policies/
install -m 644 %{_tmppath}/dove/prefs/dove.js %{buildroot}/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/defaults/pref/
install -m 644 %{_tmppath}/dove/COPYING %{buildroot}/usr/share/doc/dove-flatpak/
install -m 644 %{_tmppath}/dove/README.md %{buildroot}/usr/share/doc/dove-flatpak/

%files
/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/defaults/pref/dove.js
/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/etc/thunderbird/policies/policies.json
/var/lib/flatpak/app/org.mozilla.Thunderbird/current/active/files/lib/thunderbird/dove.cfg
/usr/share/doc/dove-flatpak/COPYING
/usr/share/doc/dove-flatpak/README.md

%changelog
* Thu Mar 06 2025 celenity <celenity@celenity.dev> - 2025.03.05.1-1
- Update to Dove 2025.03.05.1 - https://codeberg.org/celenity/Dove/releases/tag/2025.03.05.1