Skip to content

Commit 72dc5ba

Browse files
authored
Add Flatpak packaging for Linux app (#9)
Adds Flatpak manifest, .desktop file, and AppStream metadata so the Linux app can be installed via Flatpak on any distro. Includes a build script and updated README with all install options. Your coworkers can test with: ``` ./linux/build-flatpak.sh flatpak run dev.zaptech.fuso ```
1 parent d887cb7 commit 72dc5ba

5 files changed

Lines changed: 126 additions & 2 deletions

File tree

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fuso
22

3-
A lightweight macOS menu bar app for tracking your team's timezones. Native Swift, no Electron, no dependencies.
3+
A lightweight app for tracking your team's timezones. Native on macOS (Swift menu bar app) and Linux (GTK4 desktop app). No Electron, no dependencies.
44

55
Fuso sits in your menu bar and shows the current time for everyone you work with. Optionally, it can track availability based on rotating schedules — useful for teams with members who have factory shifts, hospital rotations, or any recurring time blocks.
66

@@ -15,7 +15,7 @@ brew tap zaptech-dev/tap
1515
brew install --cask fuso
1616
```
1717

18-
### From source
18+
### From source (macOS)
1919

2020
```bash
2121
git clone https://github.com/zaptech-dev/fuso.git
@@ -24,6 +24,41 @@ cd fuso
2424
open /Applications/Fuso.app
2525
```
2626

27+
### Linux (Flatpak)
28+
29+
```bash
30+
git clone https://github.com/zaptech-dev/fuso.git
31+
cd fuso
32+
./linux/build-flatpak.sh
33+
flatpak run dev.zaptech.fuso
34+
```
35+
36+
Requires `flatpak`, `flatpak-builder`, and the GNOME SDK:
37+
38+
```bash
39+
flatpak install flathub org.gnome.Platform//46 org.gnome.Sdk//46
40+
flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//24.08
41+
```
42+
43+
### Linux (from source)
44+
45+
```bash
46+
# Ubuntu/Debian: sudo apt install libgtk-4-dev
47+
# Fedora: sudo dnf install gtk4-devel
48+
# Arch: sudo pacman -S gtk4
49+
git clone https://github.com/zaptech-dev/fuso.git
50+
cd fuso/linux
51+
cargo build --release
52+
./target/release/fuso-linux
53+
```
54+
55+
### CLI (all platforms)
56+
57+
```bash
58+
cargo install fuso
59+
fuso
60+
```
61+
2762
Requires macOS 13+ and Swift 5.9+.
2863

2964
## Configuration

linux/build-flatpak.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e
3+
4+
cd "$(dirname "$0")/.."
5+
6+
# Generate cargo sources for offline build
7+
if ! command -v flatpak-cargo-generator &> /dev/null; then
8+
echo "Installing flatpak-cargo-generator..."
9+
pip install flatpak-cargo-generator 2>/dev/null || pip install --user flatpak-cargo-generator
10+
fi
11+
12+
echo "Generating cargo sources..."
13+
flatpak-cargo-generator linux/Cargo.lock -o linux/cargo-sources.json
14+
15+
echo "Building Flatpak..."
16+
flatpak-builder --force-clean --user --install build-dir linux/dev.zaptech.fuso.yml
17+
18+
echo "Done. Run with: flatpak run dev.zaptech.fuso"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Name=Fuso
3+
Comment=Track your team's timezones
4+
Exec=fuso-linux
5+
Icon=dev.zaptech.fuso
6+
Terminal=false
7+
Type=Application
8+
Categories=Utility;Clock;
9+
Keywords=timezone;clock;team;world;
10+
StartupNotify=true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>dev.zaptech.fuso</id>
4+
<name>Fuso</name>
5+
<summary>Track your team's timezones</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>MIT</project_license>
8+
<description>
9+
<p>
10+
Fuso is a lightweight desktop app for tracking your team's timezones.
11+
It shows the current time for everyone you work with and can track
12+
availability based on rotating schedules.
13+
</p>
14+
</description>
15+
<url type="homepage">https://github.com/zaptech-dev/fuso</url>
16+
<url type="bugtracker">https://github.com/zaptech-dev/fuso/issues</url>
17+
<developer id="dev.zaptech">
18+
<name>Zap Tech</name>
19+
</developer>
20+
<launchable type="desktop-id">dev.zaptech.fuso.desktop</launchable>
21+
<content_rating type="oars-1.1" />
22+
<releases>
23+
<release version="0.1.0" date="2026-03-05">
24+
<description>
25+
<p>Initial release.</p>
26+
</description>
27+
</release>
28+
</releases>
29+
</component>

linux/dev.zaptech.fuso.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
app-id: dev.zaptech.fuso
2+
runtime: org.gnome.Platform
3+
runtime-version: '46'
4+
sdk: org.gnome.Sdk
5+
sdk-extensions:
6+
- org.freedesktop.Sdk.Extension.rust-stable
7+
command: fuso-linux
8+
9+
finish-args:
10+
- --share=ipc
11+
- --socket=fallback-x11
12+
- --socket=wayland
13+
- --filesystem=~/.config/fuso:create
14+
15+
build-options:
16+
append-path: /usr/lib/sdk/rust-stable/bin
17+
env:
18+
CARGO_HOME: /run/build/fuso/cargo
19+
20+
modules:
21+
- name: fuso
22+
buildsystem: simple
23+
build-commands:
24+
- cargo --offline fetch --manifest-path linux/Cargo.toml
25+
- cargo --offline build --release --manifest-path linux/Cargo.toml
26+
- install -Dm755 linux/target/release/fuso-linux /app/bin/fuso-linux
27+
- install -Dm644 linux/data/dev.zaptech.fuso.desktop /app/share/applications/dev.zaptech.fuso.desktop
28+
- install -Dm644 linux/data/dev.zaptech.fuso.metainfo.xml /app/share/metainfo/dev.zaptech.fuso.metainfo.xml
29+
sources:
30+
- type: dir
31+
path: .
32+
- cargo-sources.json

0 commit comments

Comments
 (0)