-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsnapcraft.yaml
242 lines (209 loc) · 7.63 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
%YAML 1.1
---
# Snapcraft Recipe for [Project]
# ------------------------------
# This file is in the YAML data serialization format:
# http://yaml.org
# For the spec. of writing this file refer the following documentation:
# * The snapcraft format
# https://docs.snapcraft.io/the-snapcraft-format/8337
# * Snap Documentation
# https://docs.snapcraft.io
# * Topics under the doc category in the Snapcraft Forum
# https://forum.snapcraft.io/c/doc
# For support refer to the snapcraft section in the Snapcraft Forum:
# https://forum.snapcraft.io/c/snapcraft
#
# Copyright 2018-2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: MIT
# All following comments, including this one, are designed to be stripped
# before contributing the recipe to the upstream
# [Project], my-awesome-app, my-awesome-app-launch
# are placeholders text meant to be replaced by appropriate content
name: my-awesome-app
title: My Awesome App.
summary: Single-line elevator pitch for your amazing snap under 79 chars.
description: |
This is my-awesome-app's description. You have a paragraph or two to tell
the most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
This is the demonstration app of the Snapcrafters Template Plus:
https://github.com/Lin-Buo-Ren/snapcrafters-template-plus
# The path of icon to represent the snap, relative to the source tree directory
# Only PNG or SVG image is supported, dimension must be greater than 256x256px
icon: snap/gui/my-awesome-app.png
# The license of this application, in SPDX format
# NOTE: Currently only supports SPDX 2.1 license expressions, as described
# in Appendix IV of
# https://spdx.org/spdx-specification-21-web-version
# Supported expressions:
# https://github.com/snapcore/snapd/blob/HEAD/spdx/licenses.go
#license:
# Version string just for humans, typically '1.2+git' or '1.3.2'
# The wrapping single quotes are often required to avoid the version string
# being accidentally interpreted as a YAML non-string(like '1', '1.2').
# http://yaml.org/type
# https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html#surprising-behaviour
# NOTE: This key is mutual exclusive with the `adopt-info` key
#version: Derived from the part specified by the `adopt-info` property
# Extract metadata from the main snap part
# https://forum.snapcraft.io/t/extracting-information-from-sources-in-snapcraft-parts/4642
adopt-info: main
# Snapd feature set and version the snap requires in order to work
# https://forum.snapcraft.io/t/snapcraft-top-level-metadata/8334#heading--assumes
assumes:
- command-chain
# Base runtime
# The common runtime for the snap to run on, or `bare` for static linked applications
# https://docs.snapcraft.io/snapcraft-top-level-metadata/8334#heading--base
base: core22
# Security confinement
# Use `devmode` to getting started
# Flip to `strict` once you have the right plugs and slots,
# or `classic` once you determine that strict confinement is not currently possible
confinement: strict
# Snap Grade
# Use `devel` to getting started
# Flip to `stable` once you determine that the snap is matured, only `stable` grade
# snaps can be promoted to `candidate` and `stable` channels
grade: stable
# Run `snapcraft help sources` for supported keywords on pulling a part's
# source ingredients
# Run `snapcraft plugins` for supported build helper plugins
# Run `snapcraft help plugins` for supported keywords on building a part
# For `override-*` scriptlets used to modify behavior of certain part's
# lifecycle phase, check out:
# https://docs.snapcraft.io/scriptlets/4892
parts:
# Files to patch the files in the snap
patching:
source: snap/local/patching
plugin: dump
organize:
'*': patching/
prime:
- -*
# Launcher programs to fix problems at runtime
launchers:
source: snap/local/launchers
plugin: dump
organize:
'*': bin/
stage:
- -bin/README.*
# Stage snap for fixing the Glibc locales
# https://forum.snapcraft.io/t/the-locales-launch-stage-snap/10296
#locales-launch:
#source: https://github.com/Lin-Buo-Ren/locales-launch.git
#source-tag: v1.0.0
#plugin: dump
#stage-packages:
#- libc-bin
#- locales
#stage:
#- bin/locales-launch
#- etc/locale.alias
#- usr/bin/localedef
#- usr/share/doc/locales
#- usr/share/i18n
#- usr/share/locale
# Integrate custom dialogs in your snap - doc - snapcraft.io
# https://forum.snapcraft.io/t/integrate-custom-dialogs-in-your-snap/10825
zenity-integration:
plugin: nil
stage-snaps:
- zenity-integration
main:
after:
# for patch-desktop-entries.*
- patching
source: .
#source-type:
#source-branch:
#source-tag:
#source-depth:
build-packages:
- git
override-pull: |
set -o nounset
snapcraftctl pull
"${CRAFT_PROJECT_DIR}/snap/local/scriptlets/main-adopt-info"
plugin: dump
organize:
my-awesome-app: bin/
stage:
- bin/*
override-prime: |
set \
-o nounset
snapcraftctl prime
"${CRAFT_PROJECT_DIR}/snap/local/patching/patch-desktop-entries.bash"
# Apps that are exposed by the snap package
# If the _app_name_ is identical with the _snap_name_ it can be directly
# run with `_snap_name_` or `snap run _snap_name_` commands, otherwise it
# can only be run # via `_snap_name_._app_name_` or
# `snap run _snap_name_._app_name_`
apps:
my-awesome-app:
# An *relative path* to an executable file root from the `prime`
# directory to be executed, and its command-line arguments
# NOTE: The right angle bracket at the beginning of the value of the
# `command` keyword starts a YAML folded style block scalar, refer
# the following spec document for more info:
# http://yaml.org/spec/1.2/spec.html#id2796251
command: bin/my-awesome-app
# The commands that are run, in order, before running the one
# specified by the `command` key
command-chain:
- bin/my-awesome-app-launch
# If the providing part of the app. has a desktop entry, specify its
# path relative to the `prime` directory.
# If the packaging target doesn't provide a desktop entry, ignore the
# `desktop` key and implement a desktop entry in `/snap/gui`
#desktop: share/applications/my-awesome-app.desktop
# Snapcraft extensions that help building certain snaps
extensions:
- gnome
lint:
ignore:
- library:
- '**/libGDK-*.so*'
- '**/libgdk_pixbuf-*.so*'
- '**/libgtk-*.so*'
- '**/libnotify.so*'
- '**/libpango-*.so*'
- '**/libwebkit2gtk-*.so*'
- '**/libX11*.so*'
# Refer the following documentation for asserting interface plugs and
# slots in a security confined snap:
# Interface management - doc - snapcraft.io
# https://docs.snapcraft.io/interface-management/6154
# Supported interfaces - doc - snapcraft.io
# https://docs.snapcraft.io/supported-interfaces/7744
# Non-A/C: Non-autoconnect interface
#plugs:
# Common desktop interfaces
# https://forum.snapcraft.io/t/the-desktop-interfaces/2042
#desktop:
#desktop-legacy:
#unity7:
#wayland:
# Regular files access
#home:
#removable-media: # Non-A/C
# Application-specific files access
# The auto-connection requires store grant
# https://forum.snapcraft.io/t/the-personal-files-interface/9357
# https://forum.snapcraft.io/t/the-system-files-interface/9358
#user-wide-configs:
#interface: personal-files
#read:
#- $HOME/.config/my-awesome-app
#system-wide-configs:
#interface: system-files
#read:
#- /etc/my-awesome-app
# Network access
#network:
#slots: