Skip to content

Commit ed6131e

Browse files
Trung Nguyencursoragent
andcommitted
feat(linux): add Flatpak CI, .deb builder, and AUR PKGBUILD
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ef7f4ac commit ed6131e

14 files changed

Lines changed: 327 additions & 7 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Flatpak Linux
2+
3+
on:
4+
push:
5+
branches: [linux, "linux/**", "feat/linux-**"]
6+
paths:
7+
- "linux/**"
8+
- ".github/workflows/flatpak-linux.yml"
9+
pull_request:
10+
paths:
11+
- "linux/**"
12+
- ".github/workflows/flatpak-linux.yml"
13+
workflow_dispatch:
14+
15+
jobs:
16+
flatpak:
17+
name: flatpak-builder
18+
runs-on: ubuntu-24.04
19+
container:
20+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47
21+
options: --privileged
22+
steps:
23+
- uses: actions/checkout@v5
24+
with:
25+
ref: ${{ github.event_name == 'schedule' && 'linux' || github.ref }}
26+
- name: Build Flatpak
27+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
28+
with:
29+
bundle: tablepro.flatpak
30+
manifest-path: linux/flatpak/com.tablepro.linux.json
31+
cache-key: flatpak-builder-${{ github.sha }}
32+
upload-artifact: true

linux/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ target/
33
.DS_Store
44

55
docs/audit-*.md
6+
target/
7+
packaging/out/

linux/flatpak/com.tablepro.linux.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"runtime-version": "47",
55
"sdk": "org.gnome.Sdk",
66
"sdk-extensions": [
7-
"org.freedesktop.Sdk.Extension.rust-stable"
7+
"org.freedesktop.Sdk.Extension.rust-stable",
8+
"org.freedesktop.Sdk.Extension.llvm19"
89
],
910
"command": "tablepro-app",
1011
"finish-args": [
@@ -17,17 +18,34 @@
1718
"--talk-name=org.freedesktop.secrets"
1819
],
1920
"build-options": {
20-
"append-path": "/usr/lib/sdk/rust-stable/bin",
21+
"append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm19/bin",
22+
"prepend-ld-library-path": "/usr/lib/sdk/llvm19/lib",
2123
"env": {
2224
"CARGO_HOME": "/run/build/tablepro-app/cargo"
2325
}
2426
},
2527
"modules": [
28+
{
29+
"name": "gtksourceview5",
30+
"buildsystem": "meson",
31+
"config-opts": [
32+
"-Dgtk_doc=false",
33+
"-Dvapi=false",
34+
"-Dintrospection=enabled"
35+
],
36+
"sources": [
37+
{
38+
"type": "archive",
39+
"url": "https://download.gnome.org/sources/gtksourceview/5.16/gtksourceview-5.16.0.tar.xz",
40+
"sha256": "ab35d420102f3e8b055dd3b8642d3a48209f888189e6254d0ffb4b6a7e8c3566"
41+
}
42+
]
43+
},
2644
{
2745
"name": "tablepro-app",
2846
"buildsystem": "simple",
2947
"build-commands": [
30-
"cargo build --release -p tablepro-app",
48+
"cargo build --release -p tablepro-app --locked",
3149
"install -Dm755 target/release/tablepro-app /app/bin/tablepro-app",
3250
"install -Dm644 flatpak/com.tablepro.linux.desktop /app/share/applications/com.tablepro.linux.desktop",
3351
"install -Dm644 flatpak/com.tablepro.linux.metainfo.xml /app/share/metainfo/com.tablepro.linux.metainfo.xml",

linux/flatpak/com.tablepro.linux.metainfo.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<description>
99
<p>
1010
TablePro is a fast, native database client for Linux. It connects to
11-
PostgreSQL, MySQL, and SQLite, and lets you browse tables, edit data
12-
in place, run SQL, and tunnel through SSH bastions — all from a clean
13-
GTK4 / libadwaita interface.
11+
PostgreSQL, MySQL, SQLite, Microsoft SQL Server, and ClickHouse, and
12+
lets you browse tables, edit data in place, run SQL, and tunnel through
13+
SSH bastions — all from a clean GTK4 / libadwaita interface.
1414
</p>
1515
<p>Features:</p>
1616
<ul>
17-
<li>PostgreSQL, MySQL, and SQLite drivers</li>
17+
<li>PostgreSQL, MySQL, SQLite, MSSQL, and ClickHouse drivers</li>
1818
<li>In-place cell editing with primary-key safety</li>
1919
<li>SQL editor with syntax highlighting and Run / Cancel</li>
2020
<li>SSH tunneling with TOFU host-key checking</li>

linux/packaging/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Packaging
2+
3+
Community packaging for TablePro Linux. Flathub remains the primary distribution channel; `.deb` and AUR are secondary.
4+
5+
## Flatpak
6+
7+
Manifest: [`../flatpak/com.tablepro.linux.json`](../flatpak/com.tablepro.linux.json)
8+
9+
```bash
10+
./scripts/build-flatpak.sh
11+
```
12+
13+
CI: [`.github/workflows/flatpak-linux.yml`](../../.github/workflows/flatpak-linux.yml) builds the manifest on every Linux-path PR.
14+
15+
For Flathub offline sources:
16+
17+
```bash
18+
git clone https://github.com/flatpak/flatpak-builder-tools
19+
./scripts/generate-cargo-sources.sh ./flatpak-builder-tools
20+
```
21+
22+
## Debian / Ubuntu (`.deb`)
23+
24+
Debian source packaging lives in [`debian/`](debian/). For a quick local binary package without a full source upload:
25+
26+
```bash
27+
./scripts/build-deb.sh
28+
# → packaging/out/tablepro_0.1.0-1_amd64.deb
29+
sudo apt install ./packaging/out/tablepro_0.1.0-1_amd64.deb
30+
```
31+
32+
Build-Depends (source package): `cargo`, `rustc (>= 1.93)`, `libgtk-4-dev`, `libadwaita-1-dev`, `libgtksourceview-5-dev`, `libssl-dev`, `libsecret-1-dev`, `gettext`.
33+
34+
## Arch (AUR)
35+
36+
[`aur/PKGBUILD`](aur/PKGBUILD) builds from the upstream `linux` branch.
37+
38+
```bash
39+
cd packaging/aur
40+
makepkg -si
41+
```
42+
43+
Pin a release tag / commit and fill `sha256sums` before submitting to the AUR.

linux/packaging/aur/PKGBUILD

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Maintainer: TablePro Contributors <noreply@tablepro.app>
2+
pkgname=tablepro
3+
pkgver=0.1.0
4+
pkgrel=1
5+
pkgdesc="Native Linux database client (GTK4 / libadwaita)"
6+
arch=('x86_64')
7+
url="https://github.com/TableProApp/TablePro"
8+
license=('AGPL-3.0-or-later')
9+
depends=('gtk4' 'libadwaita' 'gtksourceview5' 'libsecret' 'openssl')
10+
makedepends=('cargo' 'git' 'pkgconf' 'clang' 'mold')
11+
source=("$pkgname-$pkgver::git+https://github.com/TableProApp/TablePro.git#branch=linux")
12+
sha256sums=('SKIP')
13+
options=('!lto')
14+
15+
prepare() {
16+
cd "$srcdir/$pkgname-$pkgver/linux"
17+
export RUSTUP_TOOLCHAIN=1.93
18+
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
19+
}
20+
21+
build() {
22+
cd "$srcdir/$pkgname-$pkgver/linux"
23+
export RUSTUP_TOOLCHAIN=1.93
24+
export CARGO_TARGET_DIR="$srcdir/target"
25+
cargo build --release --locked -p tablepro-app
26+
}
27+
28+
check() {
29+
cd "$srcdir/$pkgname-$pkgver/linux"
30+
export RUSTUP_TOOLCHAIN=1.93
31+
export CARGO_TARGET_DIR="$srcdir/target"
32+
cargo test --workspace --lib --locked
33+
}
34+
35+
package() {
36+
cd "$srcdir/$pkgname-$pkgver/linux"
37+
install -Dm755 "$srcdir/target/release/tablepro-app" "$pkgdir/usr/bin/tablepro-app"
38+
install -Dm644 flatpak/com.tablepro.linux.desktop \
39+
"$pkgdir/usr/share/applications/com.tablepro.linux.desktop"
40+
install -Dm644 flatpak/com.tablepro.linux.metainfo.xml \
41+
"$pkgdir/usr/share/metainfo/com.tablepro.linux.metainfo.xml"
42+
install -Dm644 flatpak/icons/scalable/com.tablepro.linux.svg \
43+
"$pkgdir/usr/share/icons/hicolor/scalable/apps/com.tablepro.linux.svg"
44+
}

linux/packaging/debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tablepro (0.1.0-1) UNRELEASED; urgency=medium
2+
3+
* Initial Debian packaging for the Linux GTK4 client.
4+
5+
-- TablePro Contributors <noreply@tablepro.app> Mon, 27 Jul 2026 00:00:00 +0000

linux/packaging/debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13

linux/packaging/debian/control

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Source: tablepro
2+
Section: database
3+
Priority: optional
4+
Maintainer: TablePro Contributors <noreply@tablepro.app>
5+
Build-Depends:
6+
debhelper-compat (= 13),
7+
cargo,
8+
rustc (>= 1.93),
9+
pkg-config,
10+
libgtk-4-dev,
11+
libadwaita-1-dev,
12+
libgtksourceview-5-dev,
13+
libssl-dev,
14+
libsecret-1-dev,
15+
gettext
16+
Standards-Version: 4.7.0
17+
Homepage: https://github.com/TableProApp/TablePro
18+
Rules-Requires-Root: no
19+
20+
Package: tablepro
21+
Architecture: any
22+
Depends: ${shlibs:Depends}, ${misc:Depends}
23+
Description: Native Linux database client
24+
TablePro is a fast, native GTK4 / libadwaita database client. It connects
25+
to PostgreSQL, MySQL, SQLite, Microsoft SQL Server, and ClickHouse, with
26+
in-place editing, a SQL editor, SSH tunnels, and Secret Service password
27+
storage.

linux/packaging/debian/copyright

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: TablePro
3+
Upstream-Contact: https://github.com/TableProApp/TablePro/issues
4+
Source: https://github.com/TableProApp/TablePro
5+
6+
Files: *
7+
Copyright: TablePro Authors
8+
License: AGPL-3.0-or-later
9+
10+
License: AGPL-3.0-or-later
11+
This program is free software: you can redistribute it and/or modify
12+
it under the terms of the GNU Affero General Public License as published
13+
by the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
.
16+
On Debian systems, the full text of the GNU Affero General Public
17+
License version 3 can be found in /usr/share/common-licenses/AGPL-3.

0 commit comments

Comments
 (0)