59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
# Flatpak manifest for Crystal
|
|
# To build: flatpak-builder --force-clean build-dir com.stravu.crystal.yml
|
|
app-id: com.stravu.crystal
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '23.08'
|
|
sdk: org.freedesktop.Sdk
|
|
base: org.electronjs.Electron2.BaseApp
|
|
base-version: '23.08'
|
|
command: crystal
|
|
separate-locales: false
|
|
|
|
finish-args:
|
|
# X11 + XShm access
|
|
- --share=ipc
|
|
- --socket=x11
|
|
# Wayland access
|
|
- --socket=wayland
|
|
# GPU acceleration
|
|
- --device=dri
|
|
# Network access for Claude API
|
|
- --share=network
|
|
# File system access for projects
|
|
- --filesystem=home
|
|
# Notifications
|
|
- --talk-name=org.freedesktop.Notifications
|
|
# Required for Electron apps
|
|
- --socket=pulseaudio
|
|
- --talk-name=org.kde.StatusNotifierWatcher
|
|
|
|
modules:
|
|
- name: crystal
|
|
buildsystem: simple
|
|
build-commands:
|
|
# Install the pre-built AppImage
|
|
- install -D Crystal-*.AppImage /app/bin/crystal-appimage
|
|
- chmod +x /app/bin/crystal-appimage
|
|
# Extract the AppImage
|
|
- cd /app/bin && ./crystal-appimage --appimage-extract
|
|
- rm /app/bin/crystal-appimage
|
|
- mv /app/bin/squashfs-root /app/bin/crystal-app
|
|
# Create wrapper script
|
|
- |
|
|
cat > /app/bin/crystal <<EOF
|
|
#!/bin/bash
|
|
export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
|
|
exec /app/bin/crystal-app/crystal "$@"
|
|
EOF
|
|
- chmod +x /app/bin/crystal
|
|
# Install desktop file
|
|
- install -Dm644 /app/bin/crystal-app/crystal.desktop /app/share/applications/com.stravu.crystal.desktop
|
|
- desktop-file-edit --set-key=Icon --set-value=com.stravu.crystal /app/share/applications/com.stravu.crystal.desktop
|
|
# Install icon
|
|
- install -Dm644 /app/bin/crystal-app/crystal.png /app/share/icons/hicolor/512x512/apps/com.stravu.crystal.png
|
|
sources:
|
|
- type: file
|
|
path: dist-electron/Crystal-*.AppImage
|
|
# This would be replaced with a URL in a real build:
|
|
# url: https://github.com/stravu/crystal/releases/download/vX.X.X/Crystal-X.X.X-x64.AppImage
|
|
# sha256: <sha256sum> |