File: rules

package info (click to toggle)
golang-github-appc-spec 0.8.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,108 kB
  • ctags: 1,103
  • sloc: sh: 163; makefile: 17
file content (30 lines) | stat: -rwxr-xr-x 1,169 bytes parent folder | download
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DH_GOPKG := github.com/appc/spec
export DH_GOLANG_INSTALL_ALL := 1
#export DH_GOLANG_EXCLUDES := github.com/appc/spec/schema/types/isolator_resources.go

%:
	dh $@ --buildsystem=golang --with=golang --builddirectory=_build

override_dh_clean:
	dh_clean
	## Remove Files-Excluded (when built from checkout or non-DFSG tarball):
	$(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright`
	-find vendor -mindepth 1 -type d -empty -delete -printf 'removed %p\n'

override_dh_auto_configure:
	dh_auto_configure
	## Rename "vendor" directory to "Godeps/_workspace/src":
	mkdir -p -v  _build/src/$(DH_GOPKG)/Godeps/_workspace
	mv -v _build/src/$(DH_GOPKG)/vendor  _build/src/$(DH_GOPKG)/Godeps/_workspace/src

override_dh_install:
	cd $(CURDIR)/debian/tmp/usr/share/gocode/src/$(DH_GOPKG) \
        && $(RM) -rv logos scripts DCO *.md LICENSE MAINTAINERS VERSION build test spec ace/build_aci
	## executable-not-elf-or-script:
	chmod -R -c -x+X $(CURDIR)/debian/tmp/usr/share/gocode/src/$(DH_GOPKG)
	dh_install -X.gitignore -XLICENSE