-
Notifications
You must be signed in to change notification settings - Fork 26
/
.snapcraft.yaml
149 lines (140 loc) · 4.36 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: mmapper
adopt-info: mmapper
icon: src/resources/icons/m-release.png
summary: MUME Mapper
description: |
MMapper is a graphical mapper for a MUD named MUME (Multi-Users in Middle
Earth). The game is traditionally played in a text-only mode, but MMapper tries
to represent the virtual world in user-friendly graphical environment. It acts
as a proxy between a telnet client and a MUD server, being able to analyze game
data in real time and show player's position in a map.
grade: stable
confinement: strict
base: core22
compression: lzo
architectures:
- build-on: arm64
- build-on: amd64
plugs:
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes
apps:
mmapper-desktop:
command-chain: &command-chain
- bin/desktop-launch
command: usr/bin/mmapper
common-id: org.mume.MMapper
desktop: usr/share/applications/org.mume.MMapper.desktop
plugs: &plugs
- home
- gsettings
- network
- network-bind
- opengl
- x11
- desktop
- desktop-legacy
- wayland
environment:
HOME: "$SNAP_USER_COMMON"
DISABLE_WAYLAND: 1
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/usr/share/glvnd/egl_vendor.d
parts:
mmapper:
plugin: cmake
after: [desktop-qt5]
source: .
cmake-generator: Ninja
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DWITH_UPDATER=false
build-packages:
- build-essential
- libssl-dev
- libminiupnpc-dev
- libqt5opengl5-dev
- qtbase5-dev
- qttools5-dev-tools
- zlib1g-dev
- dpkg-dev
stage-packages:
- libminiupnpc17
- libssl3
- zlib1g
- adwaita-icon-theme
- dmz-cursor-theme
- gnome-themes-standard
- libgdk-pixbuf2.0-0
- libgl1-mesa-dri
- libglu1-mesa
- libqt5gui5
- libqt5svg5
- libxkbcommon0
- light-themes
- locales-all
- shared-mime-info
- fonts-ubuntu
- qt5-gtk-platformtheme
- qtwayland5
- xdg-user-dirs
override-pull: |
craftctl default
craftctl set version=$(git describe --tags --always --long)
override-build: |
craftctl default
sed -i 's|Icon=org.mume.MMapper|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/org.mume.MMapper.png|g' $CRAFT_PART_INSTALL/usr/share/applications/org.mume.MMapper.desktop
override-prime: |
craftctl default
sed -i 's|XDG_DATA_HOME=$SNAP_USER_DATA|XDG_DATA_HOME=$SNAP_USER_COMMON|' $CRAFT_PRIME/bin/desktop-launch
sed -i 's|XDG_CONFIG_HOME=$SNAP_USER_DATA|XDG_CONFIG_HOME=$SNAP_USER_COMMON|' $CRAFT_PRIME/bin/desktop-launch
desktop-settings-packages:
plugin: nil
after: [desktop-qt5]
build-packages:
- libglib2.0-bin
stage-packages:
- gsettings-desktop-schemas
- ubuntu-settings
prime:
- usr/share/glib-2.0/schemas/*
desktop-settings-build:
plugin: nil
after: [desktop-settings-packages]
override-prime: |
set -eux
glib-compile-schemas usr/share/glib-2.0/schemas
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
# This part removes all the files in this snap which already exist in
# connected content and base snaps. Since these files will be available
# at runtime from the content and base snaps, they do not need to be
# included in this snap itself.
# More info: https://snapcraft-utils-library.readthedocs.io/en/latest/lib/cleanup.html
cleanup:
after: # Make this part run last; list all your other parts here
- mmapper
plugin: nil
build-snaps: # List all content-snaps and base snaps you're using here
- core22
override-prime: |
set -eux
for snap in "core22"; do # List all content-snaps and base snaps you're using here
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" "$CRAFT_PRIME/usr/{}" \;
done
for CRUFT in bug lintian man; do
rm -rf $CRAFT_PRIME/usr/share/$CRUFT
done
find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete
find $CRAFT_PRIME/usr/share -type d -empty -delete