-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsnapcraft.yaml
40 lines (36 loc) · 1.27 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
name: etrace
base: bare
# build-base of core18 ensures we have the newest version of build-packages such
# as git, and we get i386 builds (since there is no i386 core20 snap)
build-base: core18
adopt-info: etrace
summary: etrace traces programs for debugging or performance analysis
description: |
etrace is a utility like strace or ltrace which uses ptrace to follow
programs executed by a main program for performance and debugging analysis. It
also supports limited tracing of file accesses for analyzing what files a
program accesses during it's execution.
license: GPL-3.0
grade: stable
confinement: classic
apps:
etrace:
command: bin/etrace
parts:
etrace:
# we want static builds
build-environment:
- CGO_ENABLED: "0"
# we need git for setting the version
build-packages:
- git
plugin: go
source: .
# we override the build to do just the first step, the go plugin currently
# always will manually link the executables which forces the binaries to
# need libc, which we don't need if we set CGO_ENABLED=0
override-build: |
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
cd $SNAPCRAFT_PART_SRC
snapcraftctl set-version $(git describe --tags --always --dirty)
go build -o $SNAPCRAFT_PART_INSTALL/bin ./...