add: flatpost (#4376) (#4378)

* Add flatpost

Co-authored-by: GloriousEggroll <gloriouseggroll@gmail.com>

* bump to 1.0.5

* partially address review comments

* add mime types

* Fix typo in License

Co-authored-by: madomado <madonuko@outlook.com>
Signed-off-by: Adam Fidel <ledif@users.noreply.github.com>

* add patch to add mime types

---------

Signed-off-by: Adam Fidel <ledif@users.noreply.github.com>
Co-authored-by: GloriousEggroll <gloriouseggroll@gmail.com>
Co-authored-by: madomado <madonuko@outlook.com>
(cherry picked from commit 099779ea5c)

Co-authored-by: Adam Fidel <ledif@users.noreply.github.com>
This commit is contained in:
Raboneko
2025-04-22 23:32:36 -07:00
committed by GitHub
parent 4b7d4311e9
commit 1a8579bf86
5 changed files with 113 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "flatpost.spec"
}
}
@@ -0,0 +1,16 @@
commit 86a77b2e3d69a09f75992e6795903ab56df1a900 (HEAD -> main, fork/main)
Author: Adam Fidel <adam@fidel.id>
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;
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.flatpak.ref">
<glob pattern="*.flatpakref"/>
<comment>Flatpak Reference File</comment>
</mime-type>
<mime-type type="application/vnd.flatpak.repo">
<glob pattern="*.flatpakrepo"/>
<comment>Flatpak Repository File</comment>
</mime-type>
</mime-info>
+79
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
rpm.version(gh_rawfile("GloriousEggroll/flatpost", "main", "VERSION.txt"));