From 5e1902c54df27bf69139301f89a01253d153f40f Mon Sep 17 00:00:00 2001 From: James Osborne Date: Sat, 18 Oct 2025 02:57:24 -0400 Subject: [PATCH] Flatpak fix --- com.circlewithadot.Relibre.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/com.circlewithadot.Relibre.yml b/com.circlewithadot.Relibre.yml index 211da57..f8fe031 100644 --- a/com.circlewithadot.Relibre.yml +++ b/com.circlewithadot.Relibre.yml @@ -1,26 +1,26 @@ -app-id: com.circlewithadot.Relibre -runtime: org.gnome.Platform -runtime-version: "47" -sdk: org.gnome.Sdk -sdk-extensions: - - org.freedesktop.Sdk.Extension.golang -command: relibre - modules: - name: relibre buildsystem: simple - build-options: - rofiles: false # <— allow in-tree edits during build build-commands: - - go env -w CGO_ENABLED=1 + # Work in a writable copy of the sources + - mkdir -p work && cp -a . work/src + - cd work/src + + # Ensure CGO and rewrite webkit2gtk 4.0 -> 4.1 within the COPY, not the RO source + - cd work/src && go env -w CGO_ENABLED=1 - | + cd work/src 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 + + # Build from the writable copy + - cd work/src && go build -mod=vendor -trimpath -ldflags "-s -w" -o /app/bin/relibre + + # Optional desktop/icon + - if [ -f work/src/dist/com.circlewithadot.Relibre.desktop ]; then install -Dm644 work/src/dist/com.circlewithadot.Relibre.desktop /app/share/applications/com.circlewithadot.Relibre.desktop; fi + - if [ -f work/src/dist/com.circlewithadot.Relibre.png ]; then install -Dm644 work/src/dist/com.circlewithadot.Relibre.png /app/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png; fi sources: - type: dir path: .