summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-07-04 23:14:14 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2018-07-07 04:55:10 +0200
commit5f66af8266eda3e8bc5d1b394e5fb81271b7733f (patch)
tree78261b5930394e798af51f96119340651237e145 /Makefile
parent89bb53fe82c048fc322075b67b1bc7048d4fc53d (diff)
[pkg] generate install scripts for helper
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile20
1 files changed, 18 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4d3b01d..5aea1a2 100755
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,10 @@ SYSTRAY := 0xacab.org/leap/bitmask-systray.git
STAGING := staging
SYSTRAY_BIN := bitmask-systray
HELPER_BIN := bitmask_helper
+APP_NAME := RiseupVPN
+BUILD_RELEASE?=no
+OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
+VERSION = $(shell cat version)
# -----------------------------------------------------------------------------
# Windows
@@ -50,10 +54,19 @@ systray_osx:
go get -tags "standalone" -u $(SYSTRAY)
go build -tags "standalone" -o $(STAGING)/$(SYSTRAY_BIN) $(SYSTRAY)
upx $(STAGING)/$(SYSTRAY_BIN)
-build_osx: helper_osx systray_osx
- echo "[+] building osx..."
+bundle_osx:
mkdir -p dist
make -C osx
+pkg_osx:
+ osx/quickpkg --output dist/$(APP_NAME)-$(VERSION)_unsigned.pkg --scripts osx/scripts/ dist/$(APP_NAME).app/
+ @if [ $(BUILD_RELEASE) = no ]; then\
+ echo "[!] BUILD_RELEASE=no, skipping signature";\
+ else\
+ echo "[+] Signing the bundle";\
+ productsign --sign $(OSX_CERT) dist/$(APP_NAME)-$(VERSION)_unsigned.pkg dist/$(APP_NAME)-$(VERSION).pkg;\
+ fi
+build_osx: helper_osx systray_osx bundle_osx pkg_osx
+ echo "[+] building osx..."
# -----------------------------------------------------------------------------
# Linux
@@ -69,5 +82,8 @@ build_snap:
# Utils
# -----------------------------------------------------------------------------
+clean:
+ rm -rf dist/
+
staging\nssm.exe:
xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING)