forked from ubuntu/gnome-chess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
80 lines (72 loc) · 2.39 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: gnome-chess
adopt-info: gnome-chess
summary: Play the classic two-player board game of chess
description: |
GNOME Chess is a simple chess game. You can play against your computer at
three different difficulty levels, or against a friend at your computer.
Computer chess enthusiasts will appreciate GNOME Chess’s compatibility with
nearly all modern computer chess engines, and its ability to detect several
popular engines automatically if installed.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core22
slots:
gnome-chess:
interface: dbus
bus: session
name: org.gnome.Chess
layout:
/usr/engines/gnome-chess:
symlink: $SNAP/usr/engines/gnome-chess
apps:
gnome-chess:
extensions: [gnome]
command: usr/bin/gnome-chess
plugs:
- gsettings
- home # Needed for save game handling
- mount-observe
- network
- audio-playback
desktop: usr/share/applications/org.gnome.Chess.desktop
environment:
PATH: $SNAP/usr/games:$PATH
parts:
gnome-chess:
source: https://gitlab.gnome.org/GNOME/gnome-chess.git
source-type: git
source-tag: '46.0'
source-depth: 1
# ext:updatesnap
# version-format:
# lower-than: '47'
# no-9x-revisions: true
parse-info: [usr/share/metainfo/org.gnome.Chess.appdata.xml]
override-build: |
sed -i.bak -e 's|Icon=org.gnome.Chess$|Icon=${SNAP}/meta/gui/org.gnome.Chess.svg|g' $CRAFT_PART_SRC/data/org.gnome.Chess.desktop.in
craftctl default
mkdir -p $CRAFT_PART_INSTALL/meta/gui/
cp $CRAFT_PART_SRC/data/icons/hicolor/scalable/apps/org.gnome.Chess.svg $CRAFT_PART_INSTALL/meta/gui/
plugin: meson
meson-parameters:
- --prefix=/usr
- --sysconfdir=/usr/engines
- --buildtype=release
override-pull: |
craftctl default
craftctl set version=$(git describe --tags --abbrev=10)
gnuchess:
plugin: nil
stage-packages:
- gnuchess
# Find files provided by the base and platform snap and ensure they aren't
# duplicated in this snap
cleanup:
after: [gnome-chess, gnuchess]
plugin: nil
build-snaps: [core22, gtk-common-themes, gnome-42-2204]
override-prime: |
set -eux
for snap in "core22" "gtk-common-themes" "gnome-42-2204"; do
cd "/snap/$snap/current" && find . -type f,l -name *.so.* -exec rm -f "$CRAFT_PRIME/{}" \;
done