Files
relibre/com.circlewithadot.Relibre.yml
2025-10-18 02:57:24 -04:00

28 lines
1.1 KiB
YAML

modules:
- name: relibre
buildsystem: simple
build-commands:
# 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
# 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: .