Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 include /usr/share/dpkg/pkg-info.mk
3
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6 VERSION := $(DEB_VERSION)
7 GO_FLAGS = -ldflags "-X 'github.com/tomwright/dasel/internal.Version=v$(VERSION)'"
8
9 # golang does not support PIE on mips.
10 # see https://github.com/golang/go/issues/21222
11 ifeq (,$(filter $(DEB_HOST_ARCH),mips mipsel mips64el))
12 GO_FLAGS += -buildmode=pie
13 endif
14
15 %:
16 dh $@ --builddirectory=_build --buildsystem=golang
17
18 override_dh_auto_build:
19 dh_auto_build -- $(GO_FLAGS)
20
21 execute_before_dh_install:
22 mkdir -p debian/tmp/completions
23 _build/bin/dasel completion zsh > debian/tmp/completions/_dasel
24 _build/bin/dasel completion bash > debian/tmp/completions/dasel
25 _build/bin/dasel completion fish > debian/tmp/completions/dasel.fish
26
27 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
28 execute_before_dh_installman:
29 _build/bin/dasel man > debian/tmp/dasel.1
30 endif