File: rules

package info (click to toggle)
riseup-vpn 0.24.10%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,036 kB
  • sloc: sh: 1,966; python: 1,263; cpp: 828; asm: 641; makefile: 621; javascript: 266; ansic: 61; xml: 31
file content (35 lines) | stat: -rwxr-xr-x 1,294 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
export GOCACHE=/tmp/gocache
export DH_GOLANG_INSTALL_EXTRA=Makefile gui tests vendor/modules.txt branding providers bitmask.pro test.pro helpers pkg/pickle/helpers providers
export BUILDDIR=_build/src/0xacab.org/leap/bitmask-vpn/
export GOPATH = ${CURDIR}/_build:/usr/share/gocode
export GO111MODULE := off
export CI=1

include /usr/share/dpkg/pkg-info.mk

VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/+ds.*//' -e 's/r/\./')

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

execute_before_dh_auto_configure:
	rm -f $(CURDIR)/pkg/motd/motd_test.go $(CURDIR)/pkg/vpn/bonafide/bonafide_test.go $(CURDIR)/pkg/vpn/bonafide/gateways_test.go

override_dh_auto_build:
	cd $(BUILDDIR) && $(MAKE) gen_providers_json PROVIDER=riseup,riseupbeta && $(MAKE) build VERSION=$(VERSION) LRELEASE=/usr/lib/qt6/bin/lrelease QMAKE=/usr/bin/qmake6 PROVIDER=riseup TARGET=riseup-vpn

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Qmake test
	cd $(BUILDDIR) && qmake6 test.pro -o tests/Makefile.test && \
	cd tests && $(MAKE) -f Makefile.test && $(MAKE) -f Makefile.test clean
	# Golang test
	DH_GOLANG_EXCLUDES=gui dh_auto_test
endif

override_dh_auto_install:
	dh_auto_install -- --no-source