forked from canonical/core20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
38 lines (37 loc) · 1.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
name: core20
version: "20"
summary: Runtime environment based on Ubuntu 20.04
description: |
The base snap based on the Ubuntu 20.04 release.
confinement: strict
type: base
build-base: core20
parts:
bootstrap:
plugin: make
source: .
build-packages:
- shellcheck
- wget
- distro-info
# XXX: Dirty hacks to enable building core20 on non-bionic systems.
# Without these overrides both the PATH and LD_LIBRARY_PATH contain paths
# in the part's install directory which binaries can be incompatible with
# the ones running on our system. We don't need those while running stage
# and prime anyway.
override-stage: |
unset LD_LIBRARY_PATH;
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# ensure snapcraftctl is found, see
# https://github.com/snapcore/snapcraft/pull/2251
export PATH="$PATH:/snap/snapcraft/current/bin/scriptlet-bin"
snapcraftctl stage
override-prime: |
unset LD_LIBRARY_PATH;
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# ensure snapcraftctl is found, see
# https://github.com/snapcore/snapcraft/pull/2251
export PATH="$PATH:/snap/snapcraft/current/bin/scriptlet-bin"
snapcraftctl prime
# ensure build-in tests are run
cd ${SNAPCRAFT_PART_SRC} && make test TESTDIR=${SNAPCRAFT_PRIME}