File: rules

package info (click to toggle)
gitlab-shell 14.35.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,652 kB
  • sloc: ruby: 1,129; makefile: 583; sql: 391; sh: 384
file content (38 lines) | stat: -rwxr-xr-x 1,740 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
31
32
33
34
35
36
37
38
#!/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