15 Commits

Author SHA1 Message Date
Sebastian Palencsar
29ab78799c Add AUR publish workflow and PKGBUILD generator 2026-02-23 12:34:13 +01:00
Sebastian Palencsar
3b745dfba1 Update deskify-bin PKGBUILD for v0.1.0-alpha.7 2026-02-23 12:28:43 +01:00
Sebastian Palencsar
ba846aa2db Finalize AUR deskify-bin PKGBUILD checksums 2026-02-23 12:23:59 +01:00
Sebastian Palencsar
19a402be4d Improve quick start PATH hint and clarify install tracks 2026-02-23 12:20:37 +01:00
Sebastian Palencsar
b10db23311 Remove reviewer reply/roadmap drafts from repo 2026-02-23 12:17:20 +01:00
Sebastian Palencsar
1bc4ac4bc9 Persist app config, add list --verbose, and improve quick start/install 2026-02-23 12:15:10 +01:00
Sebastian Palencsar
4c1b350583 Clarify backend choice and chromium update usage in README 2026-02-23 11:32:20 +01:00
Sebastian Palencsar
57ab313150 Fix changelog version for alpha.6 tag 2026-02-23 11:30:29 +01:00
Sebastian Palencsar
df89b049de Add changelog entry for alpha.5 chromium backend release 2026-02-23 11:26:37 +01:00
Sebastian Palencsar
0c8687eb00 Add chromium compatibility backend with per-app profiles 2026-02-23 11:25:28 +01:00
Sebastian Palencsar
7e0771c9e0 Document DRM/protected-media limitation 2026-02-23 10:42:36 +01:00
Sebastian Palencsar
ec229db303 Remove Netflix/DRM examples from README 2026-02-23 10:41:03 +01:00
Sebastian Palencsar
f2799d5deb Add doctor/update commands, dry-run/print-config, and improve icon fallback 2026-02-23 09:22:14 +01:00
Sebastian Palencsar
e3d377462d Clarify fullscreen vs no-decorations README examples 2026-02-23 09:12:45 +01:00
Sebastian Palencsar
a7f0795818 Add manual trigger for release workflow 2026-02-23 09:11:12 +01:00
10 changed files with 1505 additions and 132 deletions

74
.github/workflows/aur-publish.yml vendored Executable file
View File

@@ -0,0 +1,74 @@
name: Publish to AUR
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
aur-publish:
name: Publish deskify-bin
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm --needed base-devel git openssh curl
- name: Checkout
uses: actions/checkout@v4
- name: Generate PKGBUILD (deskify-bin)
run: bash packaging/generate-pkgbuild-bin.sh "${GITHUB_REF_NAME}"
- name: Generate .SRCINFO
run: |
cd packaging
makepkg --printsrcinfo > .SRCINFO
- name: Configure SSH for AUR
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
test -n "${AUR_SSH_PRIVATE_KEY}" || { echo "Missing secret: AUR_SSH_PRIVATE_KEY" >&2; exit 1; }
mkdir -p ~/.ssh
chmod 700 ~/.ssh
printf "%s\n" "${AUR_SSH_PRIVATE_KEY}" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
ssh-keyscan -t rsa,ecdsa,ed25519 aur.archlinux.org >> ~/.ssh/known_hosts
cat >> ~/.ssh/config <<'EOF'
Host aur.archlinux.org
User aur
IdentityFile ~/.ssh/aur
IdentitiesOnly yes
EOF
- name: Publish to AUR (deskify-bin)
env:
AUR_USERNAME: ${{ secrets.AUR_USERNAME }}
AUR_EMAIL: ${{ secrets.AUR_EMAIL }}
run: |
git config --global user.name "${AUR_USERNAME:-deskify-bot}"
git config --global user.email "${AUR_EMAIL:-noreply@example.invalid}"
rm -rf /tmp/aur-repo
git clone ssh://aur@aur.archlinux.org/deskify-bin.git /tmp/aur-repo
cp packaging/PKGBUILD /tmp/aur-repo/PKGBUILD
cp packaging/.SRCINFO /tmp/aur-repo/.SRCINFO
cd /tmp/aur-repo
if git diff --quiet; then
echo "No changes to publish."
exit 0
fi
git add PKGBUILD .SRCINFO
git commit -m "Update deskify-bin to ${GITHUB_REF_NAME}"
git push

View File

@@ -4,6 +4,7 @@ on:
push: push:
tags: tags:
- "v*" - "v*"
workflow_dispatch:
permissions: permissions:
contents: write contents: write

View File

@@ -7,6 +7,32 @@ and this project follows early MVP/alpha versioning with tags like `v0.1.0-alpha
## [Unreleased] ## [Unreleased]
## [v0.1.0-alpha.6] - 2026-02-23
### Added
- `chromium` compatibility backend via `--backend chromium` using an installed Chromium-based browser in app mode (no local Tauri build for generated apps)
- `build` / `update` flags for Chromium backend selection and runtime control:
- `--backend <tauri|chromium>`
- `--browser-bin <PATH>`
- `--profile-scope <isolated|shared>`
- Chromium app install flow with XDG `.desktop` launchers and per-app metadata (`X-Deskify-Backend=chromium`)
- Optional isolated Chromium profiles under `~/.local/share/deskify/profiles/<id>`
- `doctor` now reports whether a Chromium-based browser is available in `PATH`
### Changed
- `update <id>` now keeps the internal app ID stable even when the display name changes
- `list` now derives the internal ID from the `.desktop` filename (works for both Tauri and Chromium backends)
- `remove` now also cleans up Chromium profile directories (when present)
- `update` keeps Chromium isolated profiles by default to preserve sessions/cookies during reinstall
### Fixed
- Tauri wrapper generation now consistently uses the existing internal ID for generated app identifiers (prevents accidental ID drift during updates)
- `.desktop` command generation for Chromium backend now escapes arguments (URLs / user agents with spaces or special characters)
### Documentation
- README now documents backend modes (`tauri` vs `chromium`) and recommends `--backend chromium` for sites that fail in the system WebView backend
- Added Chromium backend usage examples (`--browser-bin`, `--profile-scope`) and updated compatibility notes
### Added ### Added
- `build --no-decorations` option to create frameless windows (`decorations: false`) for kiosk/dashboard-style setups - `build --no-decorations` option to create frameless windows (`decorations: false`) for kiosk/dashboard-style setups
- README screenshots for KDE/Arch showing launcher integration, running app window, and `deskify list` workflow - README screenshots for KDE/Arch showing launcher integration, running app window, and `deskify list` workflow

2
Cargo.lock generated
View File

@@ -351,6 +351,7 @@ dependencies = [
"directories", "directories",
"image", "image",
"regex", "regex",
"serde",
"serde_json", "serde_json",
"tempfile", "tempfile",
"ureq", "ureq",
@@ -1334,6 +1335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [ dependencies = [
"serde_core", "serde_core",
"serde_derive",
] ]
[[package]] [[package]]

View File

@@ -9,6 +9,7 @@ clap = { version = "4.5.60", features = ["derive"] }
directories = "6.0.0" directories = "6.0.0"
image = "0.25.9" image = "0.25.9"
regex = "1.12.3" regex = "1.12.3"
serde = { version = "1.0.218", features = ["derive"] }
serde_json = "1.0.149" serde_json = "1.0.149"
tempfile = "3.25.0" tempfile = "3.25.0"
ureq = "2.9" ureq = "2.9"

182
README.md
View File

@@ -10,6 +10,8 @@
<img src="https://img.shields.io/badge/Language-Rust-orange?style=flat-square" alt="Written in Rust" /> <img src="https://img.shields.io/badge/Language-Rust-orange?style=flat-square" alt="Written in Rust" />
<img src="https://img.shields.io/badge/Powered_by-Tauri_v2-grey?style=flat-square" alt="Tauri v2" /> <img src="https://img.shields.io/badge/Powered_by-Tauri_v2-grey?style=flat-square" alt="Tauri v2" />
<img src="https://img.shields.io/badge/Status-Alpha-yellow?style=flat-square" alt="Alpha status" /> <img src="https://img.shields.io/badge/Status-Alpha-yellow?style=flat-square" alt="Alpha status" />
<img src="https://img.shields.io/github/v/release/spalencsar/deskify?label=Latest%20Release&style=flat-square" alt="Latest release" />
<img src="https://img.shields.io/badge/License-MIT-green?style=flat-square" alt="MIT license" />
</p> </p>
<p align="center"> <p align="center">
@@ -25,6 +27,34 @@
--- ---
## Quick Start
Two tracks, depending on what you want:
### Option A: Chromium mode (fastest, best compatibility)
Requirements: any Chromium-based browser installed (`chromium`, `google-chrome`, `brave`, etc.)
```bash
mkdir -p ~/.local/bin
curl -L -o ~/.local/bin/deskify \
https://github.com/spalencsar/deskify/releases/latest/download/deskify-linux-x86_64
chmod +x ~/.local/bin/deskify
# If `deskify` is not found, ensure ~/.local/bin is in PATH (common on Ubuntu/Debian):
command -v deskify >/dev/null || { echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc; }
deskify build --url "https://chat.com" --name "Chat" --backend chromium
```
### Option B: Native Tauri mode (system WebView, no Chromium dependency)
Follow the full install section below (Tauri/WebKitGTK prerequisites), then:
```bash
deskify build --url "https://chat.com" --name "Chat"
```
## Why Deskify Exists ## Why Deskify Exists
Web apps are now core tools, but Linux desktops still treat them like second-class citizens. Web apps are now core tools, but Linux desktops still treat them like second-class citizens.
@@ -91,8 +121,10 @@ flowchart TD
- Requires Tauri/Linux system dependencies to be installed locally before `deskify build` - Requires Tauri/Linux system dependencies to be installed locally before `deskify build`
- Generated app build success can vary by distro/system setup (WebKitGTK/Tauri prerequisites) - Generated app build success can vary by distro/system setup (WebKitGTK/Tauri prerequisites)
- Some modern sites fail or degrade in the system WebView backend (`tauri`) due to engine/runtime differences
- No official cross-platform support (Windows/macOS) yet - No official cross-platform support (Windows/macOS) yet
- GitHub Releases / binary automation for `deskify` itself may lag behind source updates during early MVP - GitHub Releases / binary automation for `deskify` itself may lag behind source updates during early MVP
- DRM/protected-media services may not work reliably in the system WebView backend even if they work in a full browser (depends on WebView/DRM support)
## Where Deskify Is Going ## Where Deskify Is Going
@@ -115,7 +147,7 @@ flowchart TD
A --> C[App config files] A --> C[App config files]
A --> D[Icons + .desktop entries] A --> D[Icons + .desktop entries]
C --> E[apps/chatgpt.json] C --> E[apps/chatgpt.json]
C --> F[apps/netflix.json] C --> F[apps/home-assistant.json]
B --> G[Load app config at launch] B --> G[Load app config at launch]
G --> H[Open site in system webview] G --> H[Open site in system webview]
D --> I[Linux app menu integration] D --> I[Linux app menu integration]
@@ -132,6 +164,7 @@ The table above covers the technical tradeoffs in more detail. In practice, `des
### Key Features ### Key Features
- **System-WebView Runtime Model:** Generated wrappers stay small because Deskify relies on the system WebView instead of bundling a browser runtime per app. - **System-WebView Runtime Model:** Generated wrappers stay small because Deskify relies on the system WebView instead of bundling a browser runtime per app.
- **Automatic Icon Fetching:** Scrapes high-quality 128x128 favicons automatically using the Google Favicon API. - **Automatic Icon Fetching:** Scrapes high-quality 128x128 favicons automatically using the Google Favicon API.
- **Layered Icon Fallbacks:** Tries site-provided icons first (`<link rel="icon">`, `/favicon.ico`), then falls back to the Google Favicon API, then a dummy icon.
- **XDG-Compliant System Integration:** Safely creates `.desktop` entries in `~/.local/share/applications` and manages application icons in `~/.local/share/icons/hicolor/`. - **XDG-Compliant System Integration:** Safely creates `.desktop` entries in `~/.local/share/applications` and manages application icons in `~/.local/share/icons/hicolor/`.
- **Wayland/X11 Ready:** Perfectly binds `StartupWMClass` to ensure your DE groups the app exactly to its custom icon (no generic gear icons in GNOME/KDE taskbars). - **Wayland/X11 Ready:** Perfectly binds `StartupWMClass` to ensure your DE groups the app exactly to its custom icon (no generic gear icons in GNOME/KDE taskbars).
- **Kiosk / Fullscreen Mode:** Pin applications perfectly as dashboards. - **Kiosk / Fullscreen Mode:** Pin applications perfectly as dashboards.
@@ -142,6 +175,25 @@ The table above covers the technical tradeoffs in more detail. In practice, `des
## 🚀 Installation ## 🚀 Installation
### Option A: Install a prebuilt binary (recommended)
Deskify provides Linux release binaries. Download the latest release and install it into `~/.local/bin`:
```bash
mkdir -p ~/.local/bin
curl -L -o ~/.local/bin/deskify \
https://github.com/spalencsar/deskify/releases/latest/download/deskify-linux-x86_64
chmod +x ~/.local/bin/deskify
deskify --help
```
Notes:
- The `tauri` backend still requires Tauri/WebKitGTK system dependencies to build wrappers locally.
- The `chromium` backend does not require Tauri prerequisites (but it requires an installed Chromium-based browser).
### Option B: Build from source (Tauri mode)
### 1. System Dependencies ### 1. System Dependencies
Because `deskify` compiles Tauri applications natively on your machine, you need the standard Tauri prerequisites installed before using it. Because `deskify` compiles Tauri applications natively on your machine, you need the standard Tauri prerequisites installed before using it.
@@ -209,37 +261,115 @@ Once the build finishes, `ChatGPT` will instantly appear in your system Applicat
`deskify` derives a safe internal ID from the app name (for example, `ChatGPT` becomes `chatgpt`). `deskify` derives a safe internal ID from the app name (for example, `ChatGPT` becomes `chatgpt`).
### Backend Modes (`--backend`)
Deskify supports two backend modes:
- `tauri` (default): Uses the system WebView (`webkit2gtk` on Linux). Produces small wrappers and strong Linux desktop integration, but some sites may fail due to engine compatibility.
- `chromium`: Uses an already installed Chromium-based browser (`chromium`, `google-chrome`, `brave`, etc.) in app mode. Better site compatibility and no local Tauri build, but depends on a browser installed on the system.
If a site does not work in the default `tauri` backend, try `--backend chromium`.
Quick decision rule:
- Start with the default `tauri` backend for small wrappers and native Linux integration.
- If the site fails to load, behaves incorrectly, or needs a newer browser engine, rebuild/update with `--backend chromium`.
#### Advanced Build Options #### Advanced Build Options
```bash ```bash
deskify build \ deskify build \
--url "https://netflix.com" \ --url "https://example.com/dashboard" \
--name "Netflix" \ --name "Dashboard" \
--fullscreen \ --fullscreen \
--no-decorations \
--user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0 Safari/537.36" \ --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0 Safari/537.36" \
--dark-mode \ --dark-mode \
--width 1280 \ --width 1280 \
--height 720 --height 720
``` ```
Frameless example (without fullscreen):
```bash
deskify build \
--url "https://chat.com" \
--name "Chat" \
--no-decorations \
--width 1200 \
--height 800
```
Preview the generated Tauri config without building/installing:
```bash
deskify build --url "https://chat.com" --name "Chat" --print-config
```
Chromium compatibility mode (no local Tauri build):
```bash
deskify build --url "https://mail.proton.me" --name "Proton Mail" --backend chromium
```
Chromium with shared browser profile (uses existing browser profile/session model):
```bash
deskify build \
--url "https://app.slack.com" \
--name "Slack" \
--backend chromium \
--profile-scope shared
```
Chromium with explicit browser binary:
```bash
deskify build \
--url "https://github.com" \
--name "GitHub" \
--backend chromium \
--browser-bin /usr/bin/brave-browser
```
Preview planned actions only (dry run):
```bash
deskify build --url "https://chat.com" --name "Chat" --dry-run
```
* `--icon <PATH>`: Provide a custom PNG icon instead of auto-downloading one. * `--icon <PATH>`: Provide a custom PNG icon instead of auto-downloading one.
* `--fullscreen`: Starts the app in Kiosk mode. * `--fullscreen`: Starts the app in Kiosk mode.
* `--no-decorations`: Disables native window decorations (frameless window; useful for dashboards/kiosk setups). * `--no-decorations`: Disables native window decorations (frameless window; useful for dashboards/kiosk setups).
* `--user-agent <UA>`: Useful to bypass webview restrictions on certain platforms. * `--user-agent <UA>`: Useful to bypass webview restrictions on certain platforms.
* `--dark-mode`: Forces the Tauri webview into a dark theme. * `--dark-mode`: Forces the Tauri webview into a dark theme.
* `--width <PX>` / `--height <PX>`: Sets the startup resolution. * `--width <PX>` / `--height <PX>`: Sets the startup resolution.
* `--backend <tauri|chromium>`: Choose system WebView (`tauri`) or Chromium app mode (`chromium`).
* `--browser-bin <PATH>`: Use a specific Chromium-based browser binary (Chromium backend only).
* `--profile-scope <isolated|shared>`: Chromium backend profile behavior (`isolated` creates a per-app profile under `~/.local/share/deskify/profiles/`).
* `--print-config`: Prints the generated `tauri.conf.json` and exits.
* `--dry-run`: Shows planned actions without building/installing.
Note for Chromium backend:
- `--no-decorations` is best-effort and may be ignored by the browser/window manager.
- `--width` and `--height` are applied together (`--window-size`) only when both are provided.
### Managing Apps (`list` & `remove`) ### Managing Apps (`list` & `remove`)
You can view all applications generated by `deskify`: You can view all applications generated by `deskify`:
```bash ```bash
deskify list deskify list
``` ```
Verbose list (includes URL/backend when metadata is available):
```bash
deskify list --verbose
```
*Output:* *Output:*
```text ```text
Installed Deskify Apps: Installed Deskify Apps:
- ChatGPT (Internal ID: chatgpt) - ChatGPT (Internal ID: chatgpt, Backend: tauri)
- Netflix (Internal ID: netflix) - Proton Mail (Internal ID: proton-mail, Backend: chromium)
``` ```
To entirely uninstall an app (including the binary, desktop entry, and icons): To entirely uninstall an app (including the binary, desktop entry, and icons):
@@ -249,6 +379,41 @@ deskify remove chatgpt
`remove` expects this **internal ID** (sanitized lowercase letters, numbers, `-`), not the display name. `remove` expects this **internal ID** (sanitized lowercase letters, numbers, `-`), not the display name.
### Updating Apps (`update`)
Rebuild and reinstall an existing app ID without manually running `remove` + `build`:
```bash
deskify update chat --url "https://chat.com" --name "Chat" --no-decorations
```
Deskify persists app metadata under `~/.local/share/deskify/apps/<id>.json`. With persisted metadata, `update` can be used without `--url`.
If an older app has no metadata yet, provide `--url` once (or rebuild once) to migrate it.
`update <id>` keeps the existing internal ID stable even if you change the display name.
You can also preview an update:
```bash
deskify update chat --url "https://chat.com" --dry-run
deskify update chat --url "https://chat.com" --print-config
```
Switch an existing app to Chromium compatibility mode while keeping the same internal ID:
```bash
deskify update chat --url "https://chat.com" --name "Chat" --backend chromium
```
### Diagnostics (`doctor`)
Check local prerequisites and common environment issues (Rust/Cargo, `cargo tauri`, `pkg-config`, directories):
```bash
deskify doctor
```
`doctor` also checks whether a Chromium-based browser is available in `PATH` for `--backend chromium`.
--- ---
## 🧪 Manual Smoke Test Checklist (Before a Public Release) ## 🧪 Manual Smoke Test Checklist (Before a Public Release)
@@ -273,10 +438,9 @@ Expected: clean validation error and no unintended file deletion.
## 🏷️ Versioning & GitHub Releases (MVP) ## 🏷️ Versioning & GitHub Releases (MVP)
- Recommended tag format during MVP: `v0.1.0-alpha.N` - Recommended tag format during MVP: `v0.1.0-alpha.N`
- Start with **source-first** releases (repository + tags) - GitHub Releases publish a Linux `deskify` CLI binary on tags (`v*`)
- Add automated binary releases later via GitHub Actions
For the current public alpha, use `v0.1.0-alpha.2` (and continue with `v0.1.0-alpha.N` for follow-up releases). For the latest alpha, see GitHub Releases (and continue with `v0.1.0-alpha.N` for follow-up releases).
--- ---

22
packaging/PKGBUILD Normal file
View File

@@ -0,0 +1,22 @@
pkgname=deskify-bin
pkgver=0.1.0_alpha.7
pkgrel=1
pkgdesc="Turn websites into Linux desktop apps (prebuilt binary package)"
arch=('x86_64')
url="https://github.com/spalencsar/deskify"
license=('MIT')
depends=('glibc')
provides=('deskify')
conflicts=('deskify')
_tag="v0.1.0-alpha.7"
source=("deskify::https://github.com/spalencsar/deskify/releases/download/${_tag}/deskify-linux-x86_64"
"LICENSE::https://raw.githubusercontent.com/spalencsar/deskify/${_tag}/LICENSE")
sha256sums=('7ab62ff193c2666983c72844c13f368a0ecc1fcd6da40fe95f544c9999e05f30'
'd4e53458cd2dd461f234186497b6d9b21566c477737a4d31fa6f018ef610486f')
package() {
install -Dm755 "${srcdir}/deskify" "${pkgdir}/usr/bin/deskify"
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

69
packaging/README.md Normal file
View File

@@ -0,0 +1,69 @@
## AUR package template (manual + CI)
This folder contains a minimal `PKGBUILD` template for a future AUR package:
- `deskify-bin` (prebuilt GitHub Releases binary)
Notes:
- Update `_tag` and `pkgver` when you publish a new release tag.
- Update `sha256sums` to match the release asset + LICENSE for that tag.
### Local build test
```bash
cd packaging
makepkg -sf
```
To compute sha256 sums for a tag:
```bash
TAG="v0.1.0-alpha.7"
curl -fL -o /tmp/deskify-linux-x86_64 "https://github.com/spalencsar/deskify/releases/download/${TAG}/deskify-linux-x86_64"
curl -fL -o /tmp/LICENSE "https://raw.githubusercontent.com/spalencsar/deskify/${TAG}/LICENSE"
sha256sum /tmp/deskify-linux-x86_64 /tmp/LICENSE
```
### Manual AUR publish (first time)
1. Create an AUR account and submit the `deskify-bin` package once via the AUR web UI.
2. Configure SSH for AUR and test connectivity.
3. Clone the AUR repo, copy `PKGBUILD` and `.SRCINFO`, then push.
Example:
```bash
ssh-keygen -t ed25519 -f ~/.ssh/aur -C "deskify-aur"
# Add ~/.ssh/aur.pub to: aur.archlinux.org -> My Account -> SSH Keys
cat >> ~/.ssh/config <<'EOF'
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aur
EOF
ssh -T aur@aur.archlinux.org
git clone ssh://aur@aur.archlinux.org/deskify-bin.git
cd deskify-bin
cp /path/to/deskify/packaging/PKGBUILD .
makepkg --printsrcinfo > .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Initial release: deskify-bin"
git push
```
### CI publish on tags
This repo includes a workflow that publishes `deskify-bin` on tag pushes (`v*`):
- `.github/workflows/aur-publish.yml`
Required GitHub secrets:
- `AUR_SSH_PRIVATE_KEY` (private key content for the AUR account)
- `AUR_USERNAME` (optional, used for git commits)
- `AUR_EMAIL` (optional, used for git commits)

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env bash
set -euo pipefail
TAG="${1:-}"
if [[ -z "${TAG}" ]]; then
TAG="$(git describe --tags --abbrev=0)"
fi
if [[ "${TAG}" != v* ]]; then
echo "Error: expected tag like v0.1.0-alpha.7, got: ${TAG}" >&2
exit 1
fi
VERSION="${TAG#v}"
# Arch PKGBUILD pkgver must not contain '-'. Use dots instead.
PKGVER="${VERSION//-/.}"
ASSET_URL="https://github.com/spalencsar/deskify/releases/download/${TAG}/deskify-linux-x86_64"
LICENSE_URL="https://raw.githubusercontent.com/spalencsar/deskify/${TAG}/LICENSE"
tmp_dir="$(mktemp -d)"
trap 'rm -rf "${tmp_dir}"' EXIT
asset_path="${tmp_dir}/deskify-linux-x86_64"
license_path="${tmp_dir}/LICENSE"
curl -fL -o "${asset_path}" "${ASSET_URL}"
curl -fL -o "${license_path}" "${LICENSE_URL}"
ASSET_SHA256="$(sha256sum "${asset_path}" | awk '{print $1}')"
LICENSE_SHA256="$(sha256sum "${license_path}" | awk '{print $1}')"
cat > packaging/PKGBUILD <<EOF
pkgname=deskify-bin
pkgver=${PKGVER}
pkgrel=1
pkgdesc="Turn websites into Linux desktop apps (prebuilt binary package)"
arch=('x86_64')
url="https://github.com/spalencsar/deskify"
license=('MIT')
depends=('glibc')
optdepends=('chromium: for --backend chromium')
provides=('deskify')
conflicts=('deskify')
_tag="${TAG}"
source=("deskify::https://github.com/spalencsar/deskify/releases/download/\${_tag}/deskify-linux-x86_64"
"LICENSE::https://raw.githubusercontent.com/spalencsar/deskify/\${_tag}/LICENSE")
sha256sums=('${ASSET_SHA256}'
'${LICENSE_SHA256}')
package() {
install -Dm755 "\${srcdir}/deskify" "\${pkgdir}/usr/bin/deskify"
install -Dm644 "\${srcdir}/LICENSE" "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE"
}
EOF
echo "Wrote packaging/PKGBUILD for ${TAG}"

File diff suppressed because it is too large Load Diff