| 1 | #!/usr/bin/make -f |
| 2 | |
| 3 | include /usr/share/dpkg/default.mk |
| 4 | |
| 5 | # Uncomment this to turn on verbose mode. |
| 6 | # export DH_VERBOSE=1 |
| 7 | |
| 8 | %: |
| 9 | dh $@ --builddirectory=_build --buildsystem=golang |
| 10 | |
| 11 | execute_after_dh_auto_configure: |
| 12 | # dh_auto_configure first copies source files to the build root, then |
| 13 | # symlinks libraries from /usr/share/gocode/src. |
| 14 | # The dependency symlink will NOT occur when the library package uses the |
| 15 | # same XS-Go-Import-Path (DH_GOPKG) as the source package and ship files |
| 16 | # under the same GOPATH, causing problems in dh_auto_build due to lack of |
| 17 | # installed libraries. |
| 18 | # dh_auto_configure: warning: "sigs.k8s.io/kustomize" is already installed. |
| 19 | # https://salsa.debian.org/go-team/packages/dh-golang/-/blob/81892fe8d3a51a22c910a649052669dd9f18837e/lib/Debian/Debhelper/Buildsystem/golang.pm#L495 |
| 20 | ln -vs /usr/share/gocode/src/sigs.k8s.io/kustomize/kyaml $(CURDIR)/_build/src/sigs.k8s.io/kustomize/kyaml |
| 21 | |
| 22 | execute_after_dh_auto_build: |
| 23 | # Remove test files that depends on docker |
| 24 | find _build/src/sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e -name "e2e_test.go" -delete |
| 25 | find _build/src/sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e -name "test_util_test.go" -delete |
| 26 | |
| 27 | override_dh_auto_install: |
| 28 | dh_auto_install -- --no-binaries |