summaryrefslogtreecommitdiff
path: root/branding/templates/debian
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2019-08-16 22:19:12 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2019-08-16 22:19:12 +0200
commit78ee21c4a87d2e13c4f682162f15aa6411bea592 (patch)
tree1f691ec945260e51bcf8af944867a5a24475dc3c /branding/templates/debian
parent80db87660a5d013b6cb917b7efbf0150d3081047 (diff)
[pkg] update debian template
Diffstat (limited to 'branding/templates/debian')
-rwxr-xr-xbranding/templates/debian/rules-template20
1 files changed, 17 insertions, 3 deletions
diff --git a/branding/templates/debian/rules-template b/branding/templates/debian/rules-template
index 686cdd7..9f765ab 100755
--- a/branding/templates/debian/rules-template
+++ b/branding/templates/debian/rules-template
@@ -3,9 +3,24 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS
+export GO111MODULE=on
+export GOCACHE=/tmp/gocache
export DH_GOPKG = 0xacab.org/leap/bitmask-vpn
-export DH_GOLANG_EXCLUDES = vendor
+export DH_GOLANG_EXCLUDES := vendor packages tools cmd/bitmask-helper cmd/bitmask-connect
+
+#dh_golang doesn't do this for you
+
+ifeq ($(DEB_HOST_ARCH), i386)
+ export GOARCH := 386
+else ifeq ($(DEB_HOST_ARCH), amd64)
+ export GOARCH := amd64
+else ifeq ($(DEB_HOST_ARCH), armhf)
+ export GOARCH := arm
+else ifeq ($(DEB_HOST_ARCH), arm64)
+ export GOARCH := arm64
+endif
+
# TODO get the static version that gen_pkg generated instead??
VERSION = debian-$(shell git describe --tags --always)
@@ -17,6 +32,7 @@ APPNAME = ${binaryName}
override_dh_auto_test:
override_dh_auto_build:
+ mkdir -p /tmp/gocache
rm -rf src/0xacab.org/leap/bitmask-vpn/tools/transifex
rm -rf obj-$(DEB_BUILD_GNU_TYPE)/src/0xacab.org/leap/bitmask-vpn/tools/transifex
rm -rf tools
@@ -29,8 +45,6 @@ override_dh_install:
cp $(CURDIR)/helpers/se.leap.bitmask.policy $(CURDIR)/debian/${APPNAME}/usr/share/polkit-1/actions
rm -fr $(CURDIR)/debian/${APPNAME}/usr/share/gocode
strip $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-vpn
- rm $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-helper
- rm $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-connect
mv $(CURDIR)/debian/${APPNAME}/usr/bin/bitmask-vpn $(CURDIR)/debian/${APPNAME}/usr/bin/${APPNAME}
mkdir -p $(CURDIR)/debian/${APPNAME}/usr/share/${APPNAME}
cp $(CURDIR)/debian/icons/scalable/icon.svg $(CURDIR)/debian/${APPNAME}/usr/share/${APPNAME}/icon.svg