remote-touchpad/snap/snapcraft.yaml
2022-09-28 00:48:41 +02:00

57 lines
1.8 KiB
YAML

# Build by running "snapcraft".
# WARNING:
# Snapcraft uses caching for already build steps but it's buggy and can cause strange problems.
# Clean the cache by running "snapcraft clean".
name: remote-touchpad
license: GPL-3.0+
grade: stable
adopt-info: remote-touchpad
base: core20
confinement: strict
apps:
remote-touchpad:
command: bin/remote-touchpad
plugs:
- network-bind
- desktop
- x11
remote-touchpad-wait-on-error:
command: bin/remote-touchpad-wait-on-error
plugs:
- network-bind
- desktop
- x11
common-id: com.github.unrud.RemoteTouchpad
desktop: share/applications/com.github.unrud.RemoteTouchpad.desktop
parts:
remote-touchpad:
plugin: go
go-buildtags:
- portal
- x11
source: .
source-type: git
build-packages:
- gcc
- libc6-dev
- libxt-dev
- libxtst-dev
stage-packages:
- libxt6
- libxtst6
override-pull: |
snapcraftctl pull
# WORKAROUND: Point icon directly to SVG otherwise snapcraft can't find it
sed -e 's|Icon=com.github.unrud.RemoteTouchpad|Icon=/usr/share/icons/hicolor/scalable/apps/com.github.unrud.RemoteTouchpad.svg|' -i desktop/com.github.unrud.RemoteTouchpad.desktop
override-build: |
snapcraftctl build
install -Dm0755 -t "${SNAPCRAFT_PART_INSTALL}/bin" desktop/remote-touchpad-wait-on-error
install -Dm0644 -t "${SNAPCRAFT_PART_INSTALL}/usr/share/metainfo" desktop/com.github.unrud.RemoteTouchpad.metainfo.xml
install -Dm0644 -t "${SNAPCRAFT_PART_INSTALL}/usr/share/applications" desktop/com.github.unrud.RemoteTouchpad.desktop
install -Dm0644 -t "${SNAPCRAFT_PART_INSTALL}/usr/share/icons/hicolor/scalable/apps" desktop/com.github.unrud.RemoteTouchpad.svg
parse-info: [usr/share/metainfo/com.github.unrud.RemoteTouchpad.metainfo.xml]