diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-16 22:19:12 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-16 22:19:12 +0200 |
commit | 78ee21c4a87d2e13c4f682162f15aa6411bea592 (patch) | |
tree | 1f691ec945260e51bcf8af944867a5a24475dc3c | |
parent | 80db87660a5d013b6cb917b7efbf0150d3081047 (diff) |
[pkg] update debian template
-rwxr-xr-x | branding/templates/debian/rules-template | 20 | ||||
-rwxr-xr-x | branding/templates/makefile/Makefile | 1 |
2 files changed, 18 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 diff --git a/branding/templates/makefile/Makefile b/branding/templates/makefile/Makefile index 2eb7312..42b1482 100755 --- a/branding/templates/makefile/Makefile +++ b/branding/templates/makefile/Makefile @@ -97,6 +97,7 @@ pkg_deb: # bitmask-vpn tar.gz should be placed in parent forlder after doing 'make prepare' with the # bitmask-vpn topmost Makefile. @cp ../bitmask-vpn_$(VERSION).tgz build/$(BINNAME)_${DEB_VERSION}.orig.tar.gz + @rm -rf build/${BINNAME}_${DEB_VERSION} build/bitmask-vpn_${VERSION}-src @cd build && tar xzf $(BINNAME)_${DEB_VERSION}.orig.tar.gz && mv bitmask-vpn_${VERSION}-src ${BINNAME}_${DEB_VERSION} @cp -r debian/ build/$(BINNAME)_$(DEB_VERSION)/ @cd build/$(BINNAME)_$(DEB_VERSION) && debuild -us -uc |