Flatpak fix

This commit is contained in:
2025-10-18 02:57:24 -04:00
parent b577f7df60
commit 5e1902c54d

View File

@@ -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: modules:
- name: relibre - name: relibre
buildsystem: simple buildsystem: simple
build-options:
rofiles: false # <— allow in-tree edits during build
build-commands: 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) files=$(grep -R -l 'webkit2gtk-4\.0' vendor || true)
if [ -n "$files" ]; then if [ -n "$files" ]; then
sed -i 's/webkit2gtk-4\.0/webkit2gtk-4\.1/g' $files sed -i 's/webkit2gtk-4\.0/webkit2gtk-4\.1/g' $files
fi 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 # Build from the writable copy
- 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 - 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: sources:
- type: dir - type: dir
path: . path: .