fix PKGBULID
This commit is contained in:
@@ -1,37 +1,38 @@
|
||||
# Flatpak manifest for the native webview build of Relibre
|
||||
# Build with:
|
||||
# flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml
|
||||
# flatpak run com.circlewithadot.Relibre
|
||||
app-id: com.circlewithadot.Relibre
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: '46'
|
||||
runtime-version: '47'
|
||||
sdk: org.gnome.Sdk
|
||||
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.golang
|
||||
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/golang/bin
|
||||
env:
|
||||
GOPATH: /run/build/relibre/.gopath
|
||||
|
||||
command: relibre
|
||||
finish-args:
|
||||
# WebKitGTK needs network; your app also runs a localhost HTTP server
|
||||
- --share=network
|
||||
# UI backends
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
# Allow saving to Downloads (your /save endpoint writes there)
|
||||
- --filesystem=xdg-download
|
||||
# Optional: allow opening files via portal
|
||||
- --talk-name=org.freedesktop.portal.Desktop
|
||||
|
||||
modules:
|
||||
# Build your Go app inside the sandbox
|
||||
- name: relibre
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
# Ensure modules cached and vendor if you like (optional)
|
||||
- go env -w CGO_ENABLED=1
|
||||
- go mod download
|
||||
# Build the binary into /app/bin
|
||||
- go build -trimpath -ldflags "-s -w" -o /app/bin/relibre
|
||||
# Install desktop file and icon
|
||||
- install -Dm644 dist/com.circlewithadot.Relibre.desktop /app/share/applications/com.circlewithadot.Relibre.desktop
|
||||
- install -Dm644 dist/com.circlewithadot.Relibre.png /app/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png
|
||||
- |
|
||||
set -e
|
||||
files=$(grep -R -l 'webkit2gtk-4\.0' vendor || true)
|
||||
if [ -n "$files" ]; then
|
||||
sed -i 's/webkit2gtk-4\.0/webkit2gtk-4.1/g' $files
|
||||
fi
|
||||
- go build -mod=vendor -trimpath -ldflags "-s -w" -o /app/bin/relibre
|
||||
- if [ -f dist/com.circlewithadot.Relibre.desktop ]; then install -Dm644 dist/com.circlewithadot.Relibre.desktop /app/share/applications/com.circlewithadot.Relibre.desktop; fi
|
||||
- if [ -f dist/com.circlewithadot.Relibre.png ]; then install -Dm644 dist/com.circlewithadot.Relibre.png /app/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png; fi
|
||||
sources:
|
||||
# Use the current directory as source (assuming manifest sits at repo root)
|
||||
- type: dir
|
||||
path: .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user