Skip to content

Commit

Permalink
First pass of flatpak support.
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerCode committed Jan 5, 2024
1 parent 6b904df commit 5d35471
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
go.work
*.snap
cycles
.flatpak-builder/checksums/x86_64-us.tylerc.cycles.json
.flatpak-builder/ccache/disabled/ccache.conf
1 change: 1 addition & 0 deletions appimage/tylercode-cycles.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[Desktop Entry]
Name=Cycles
Comment=A simple, theme-aware, CPU information tool
Exec=cycles
Icon=icon
Type=Application
Expand Down
53 changes: 53 additions & 0 deletions us.tylerc.cycles.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>us.tylerc.cycles</id>

<name>cycles</name>
<developer_name>TylerCode</developer_name>
<summary>A simple, theme-aware, CPU information tool</summary>

<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>

<recommends>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</recommends>

<description>
<p>This application displays all logical cores on the machine and the current clock speed and core utilization. The theme is controlled by the OS.</p>
</description>

<launchable type="desktop-id">us.tylerc.cycles.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/TylerCode/cycles/main/snap/local/screenshot-dark-0.3.png</image>
<caption>Screenshot</caption>
</screenshot>
</screenshots>

<!-- Override the kudos that aren't automatically added. See https://gitlab.gnome.org/GNOME/gnome-software/blob/main/doc/kudos.md.-->
<!-- This is not required in any way but helps software centers better understand Fyne applications. If you don't use notifications, you should remove it from the list. -->
<kudos>
<kudo>ModernToolkit</kudo>
<!-- <kudo>Notifications</kudo> -->
</kudos>

<url type="bugtracker">https://github.com/TylerCode/cycles/issues</url>
<url type="donation">https://tylerc.us</url>
<url type="homepage">https://github.com/TylerCode/cycles</url>

<!-- Generate the oars rating at: https://hughsie.github.io/oars/generate.html -->
<content_rating type="oars-1.1" />

<releases>
<release version="0.3.3" date="2024-01-04" type="stable">
<description>
<p>Initial flatpak release, enhanced graph sizing</p>
</description>
<url type="details">https://github.com/TylerCode/cycles/releases</url>
</release>
</releases>

</component>
7 changes: 7 additions & 0 deletions us.tylerc.cycles.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Cycles
Comment=A simple, theme-aware, CPU information tool
Categories=Utility;
Icon=us.tylerc.cycles
Exec=cycles
38 changes: 38 additions & 0 deletions us.tylerc.cycles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
app-id: us.tylerc.cycles
runtime: org.freedesktop.Platform
runtime-version: '20.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.golang
command: cycles

finish-args:
- --share=ipc
- --socket=x11
- --device=dri
- --socket=wayland

# Needed to support desktop notifications.
#- --talk-name=org.freedesktop.Notifications

# Allowing access to the home directory as example.
- --filesystem=home

build-options:
env:
- GOBIN=/app/bin
- GOROOT=/usr/lib/sdk/golang

modules:
- name: cycles
buildsystem: simple
build-commands:
- $GOROOT/bin/go build -trimpath -o cycles
- install -Dm00755 cycles $FLATPAK_DEST/bin/cycles
- install -Dm00644 icon.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png
- install -Dm00644 $FLATPAK_ID.desktop $FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop
- install -Dm00644 $FLATPAK_ID.appdata.xml $FLATPAK_DEST/share/appdata/$FLATPAK_ID.appdata.xml
sources:
- type: archive
url: "https://github.com/fyne-io/cycles/archive/refs/tags/v1.3.0.tar.gz"
sha256: a9d3b920404b3b699da757a9641ebc75cf43e35515dd9879622de33c6d104b63 # Update by running sha256sum on the file linked in the url.

0 comments on commit 5d35471

Please sign in to comment.