#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk BUILDDIR := _build/src/gitlab.com/gitlab-org/gitlab-shell/v14 VENDORDIR := ${BUILDDIR}/vendor SYSTEMGOCODE := /usr/share/gocode/src export DH_GOLANG_EXCLUDES := internal/testhelper $(shell cd client && ls *_test.go) $(shell find internal -type f -name '*_test.go') client/testserver %: dh $@ --buildsystem=golang --with=golang --package=golang-gitlab-gitlab-org-gitlab-shell-v14-dev \ --builddirectory=_build dh $@ --buildsystem=golang --with=golang --builddirectory=_build --package=gitlab-shell override_dh_auto_configure-indep: dh_auto_configure -O--buildsystem=golang -O--with=golang -O--builddirectory=_build -O--package=golang-gitlab-gitlab-org-gitlab-shell-v14-dev override_dh_auto_configure-arch: dh_auto_configure -O--buildsystem=golang -O--with=golang -O--builddirectory=_build -O--package=gitlab-shell execute_before_dh_auto_build: # merge vendor from gitaly with vendor in build directory using simbolic links # if the command fails with errors like cp: not replacing '_build/src/gitlab.com/gitlab-org/gitlab/vendor/...' # then remove any conflicting modules from vendor tarball # we should copy only once (this code will run once each for build-indep and build-arch # otherwise) if ! [ -f debian/gitaly-vendor-copied ]; then \ cp -arsn ${SYSTEMGOCODE}/gitlab.com/gitlab-org/gitaly/v16/vendor/* \ ${VENDORDIR}/ && touch debian/gitaly-vendor-copied; fi override_dh_auto_install: dh_auto_install mv $(CURDIR)/debian/tmp/usr/bin/check $(CURDIR)/debian/tmp/usr/bin/gitlab-shell-check override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) -dh_auto_test -O--buildsystem=golang -O--package=gitlab-shell endif