summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-07-04 22:25:15 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2018-07-07 04:54:53 +0200
commit89bb53fe82c048fc322075b67b1bc7048d4fc53d (patch)
tree23cc4176f8615bc4bdba5e2f9e10e91fd62319e6 /Makefile
parentf81d41682ec26c489264351679924fae76884a3d (diff)
[pkg] move info.plist to template
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile49
1 files changed, 44 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7e9ec69..4d3b01d 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,11 @@
-SYSTRAY := 0xacab.org/leap/bitmask-systray
+SYSTRAY := 0xacab.org/leap/bitmask-systray.git
STAGING := staging
+SYSTRAY_BIN := bitmask-systray
+HELPER_BIN := bitmask_helper
+
+# -----------------------------------------------------------------------------
+# Windows
+# -----------------------------------------------------------------------------
deps_win:
choco install -y golang python upx nssm nsis wget 7zip
@@ -14,21 +20,54 @@ openvpn_win:
copy .\staging\openvpn\openvpn.exe .\staging
copy .\staging\openvpn\*.dll .\staging
helper_win:
- go build -ldflags "-s -w" -o $(STAGING)/bitmask_helper.exe .\helper
- upx $(STAGING)/bitmask_helper.exe
+ go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN).exe .\helper
+ upx $(STAGING)/$(HELPER_BIN).exe
systray_win:
go get -tags "standalone" -u $(SYSTRAY)
- go build -tags "standalone" -ldflags "-H windowsgui -s -w" -o $(STAGING)/bitmask-systray.exe $(SYSTRAY)
+ go build -tags "standalone" -ldflags "-H windowsgui -s -w" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)
build_win: staging\nssm.exe helper_win systray_win
# since it's tedious, I assume you did bootstrap openvpn_win manually already.
echo "[+] building windows"
if not exist dist mkdir dist
make -C win
"C:\Program Files (x86)\NSIS\makensis.exe" win/RiseupVPN-installer.nsi
-build_osx:
+
+# -----------------------------------------------------------------------------
+# OSX
+# -----------------------------------------------------------------------------
+
+deps_osx:
+# TODO - bootstrap homebrew if not there
+ brew install python golang make upx
+openvpn_osx:
+# TODO - the build script is in bitmask-dev/pkg/thirdparty. we can clone from there, or move that stuff here.
+# TODO for now we can download it from downloads.leap.se
+ echo "[+] downloading openvpn..."
+helper_osx:
+ go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN) ./helper
+ upx $(STAGING)/$(HELPER_BIN)
+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..."
+ mkdir -p dist
+ make -C osx
+
+# -----------------------------------------------------------------------------
+# Linux
+# -----------------------------------------------------------------------------
+
build_snap:
+# TODO migrate here the snap folder in bitmask-dev.
+# We should transition pushing *this one* to edge (via launchpad) for some time, and when it's sufficiently tested
+# we can pin this repo as the only source for the snap.
echo "[+] building snap..."
+# -----------------------------------------------------------------------------
+# Utils
+# -----------------------------------------------------------------------------
+
staging\nssm.exe:
xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING)