diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-01-24 00:52:41 +0100 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-01-24 02:05:42 +0100 |
commit | 6d0164d023718031357fd53f3aec5c9d1d764bcd (patch) | |
tree | bf0b1d4e1b7914b20db3dd7e77ef5f12ced609df /Makefile | |
parent | 2231cce159bcf92004fbcc23a20399b26bc49243 (diff) |
[pkg] update deb after code refactor
this must be run from the Makefile.
it also needs recent changes to bitmask-vpn, including the removal of
golang.org/x/text and others from the vendor.
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,3 +1,4 @@ +APPNAME := riseup-vpn SYSTRAY := 0xacab.org/leap/bitmask-vpn STAGING := staging SYSTRAY_BIN := bitmask-vpn @@ -7,7 +8,7 @@ BUILD_RELEASE?=no OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project" VERSION = $(shell git -C `go env GOPATH`/src/$(SYSTRAY) describe --tags --always) -TGZ_PATH = $(shell pwd)/dist/riseup-vpn-$(VERSION) +TGZ_PATH = $(shell pwd)/dist/$(APPNAME)-$(VERSION) tgz: mkdir -p $(TGZ_PATH) git -C `go env GOPATH`/src/$(SYSTRAY) archive HEAD | tar -x -C $(TGZ_PATH) @@ -15,7 +16,7 @@ tgz: wget -O $(TGZ_PATH)/helpers/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root chmod +x $(TGZ_PATH)/helpers/bitmask-root wget -O $(TGZ_PATH)/helpers/se.leap.bitmask.policy https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy - cd dist; tar cvzf riseup-vpn-$(VERSION).tgz riseup-vpn-$(VERSION) + cd dist; tar cvzf $(APPNAME)-$(VERSION).tgz $(APPNAME)-$(VERSION) rm -r $(TGZ_PATH) # ----------------------------------------------------------------------------- @@ -104,14 +105,25 @@ build_snap: snapcraft build snapcraft snap mkdir -p dist - mv riseup-vpn* dist/ + mv $(APPNAME)* dist/ + +DEB_VER = $(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1) +build_deb: tgz + echo "[+] building deb..." + mkdir -p build + mkdir -p dist + cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(DEB_VER).orig.tar.gz + cd build && tar xzf $(APPNAME)_$(DEB_VER).orig.tar.gz + cp -r debian/ build/$(APPNAME)-$(VERSION)/ + cd build/$(APPNAME)-$(VERSION) && debuild -us -uc + cp build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion)_*.deb dist/ # ----------------------------------------------------------------------------- # Utils # ----------------------------------------------------------------------------- clean: - rm -rf dist/ + rm -rf dist/ build/ staging\nssm.exe: xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING) |