diff --git a/anda/apps/flatpost/anda.hcl b/anda/apps/flatpost/anda.hcl new file mode 100644 index 0000000000..8c63cdb5fd --- /dev/null +++ b/anda/apps/flatpost/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "flatpost.spec" + } +} diff --git a/anda/apps/flatpost/flatpost-desktop-mimetype.patch b/anda/apps/flatpost/flatpost-desktop-mimetype.patch new file mode 100644 index 0000000000..9a38226d84 --- /dev/null +++ b/anda/apps/flatpost/flatpost-desktop-mimetype.patch @@ -0,0 +1,16 @@ +commit 86a77b2e3d69a09f75992e6795903ab56df1a900 (HEAD -> main, fork/main) +Author: Adam Fidel +Date: Tue Apr 22 14:52:16 2025 -0500 + + feat: add MimeType to .desktop file + +diff --git a/data/usr/share/applications/com.flatpost.flatpostapp.desktop b/data/usr/share/applications/com.flatpost.flatpostapp.desktop +index 73013fc..d1f321d 100644 +--- a/data/usr/share/applications/com.flatpost.flatpostapp.desktop ++++ b/data/usr/share/applications/com.flatpost.flatpostapp.desktop +@@ -4,3 +4,4 @@ Exec=python3 /usr/bin/flatpost + Icon=com.flatpost.flatpostapp + Type=Application + Categories=Utility; ++MimeType=application/vnd.flatpak.ref;application/vnd.flatpak.repo; + diff --git a/anda/apps/flatpost/flatpost-mime.xml b/anda/apps/flatpost/flatpost-mime.xml new file mode 100644 index 0000000000..c473050ee5 --- /dev/null +++ b/anda/apps/flatpost/flatpost-mime.xml @@ -0,0 +1,11 @@ + + + + + Flatpak Reference File + + + + Flatpak Repository File + + diff --git a/anda/apps/flatpost/flatpost.spec b/anda/apps/flatpost/flatpost.spec new file mode 100644 index 0000000000..0c89931c62 --- /dev/null +++ b/anda/apps/flatpost/flatpost.spec @@ -0,0 +1,79 @@ +%global tag 1.0.5 + +Name: flatpost +Version: %{tag} +Release: 1%?dist +License: BSD-2-Clause +Summary: Desktop environment agnostic Flathub software center. + +URL: https://github.com/gloriouseggroll/flatpost +Source0: %{url}/archive/refs/tags/%{tag}.tar.gz#/%{name}-%{tag}.tar.gz +Source1: flatpost-mime.xml +Patch0: flatpost-desktop-mimetype.patch + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: make +BuildRequires: desktop-file-utils + +Provides: nobara-updater + +# App Deps +Requires: python +Requires: python3 +Requires: python3-gobject +Requires: python3-requests +Requires: python3-pillow +Requires: python3-svgwrite +Requires: python3-fonttools +Requires: python3-numpy + +Requires: flatpak +Requires: glib2 +Requires: gtk3 +Requires: gtk4 +Requires: xdg-utils + +Requires(post): shared-mime-info +Requires(postun): shared-mime-info +Requires(posttrans): shared-mime-info + +%description +Desktop environment agnostic Flathub software center. Allows for browsing, +installation, removal, updating, and permission management of flatpak packages and repositories. + +%prep +%autosetup -p1 + +%build +make all DESTDIR=%{buildroot} +install -D -m644 %{SOURCE1} %{buildroot}/usr/share/mime/packages/flatpost.xml + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/com.flatpost.flatpostapp.desktop + +%post +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%postun +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%posttrans +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%files +%{python3_sitelib}/flatpost/ +%{_bindir}/flatpost +%{_datadir}/applications/com.flatpost.flatpostapp.desktop +%{_datadir}/flatpost/collections_data.json +%{_datadir}/icons/hicolor/1024x1024/apps/com.flatpost.flatpostapp.png +%{_datadir}/icons/hicolor/64x64/apps/com.flatpost.flatpostapp.png +%{_datadir}/mime/packages/flatpost.xml +%license %{_datadir}/licenses/flatpost/LICENSE + diff --git a/anda/apps/flatpost/update.rhai b/anda/apps/flatpost/update.rhai new file mode 100644 index 0000000000..99eead2d72 --- /dev/null +++ b/anda/apps/flatpost/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_rawfile("GloriousEggroll/flatpost", "main", "VERSION.txt"));