summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rwxr-xr-xpkg/build_osx_bundle_with_venv.sh54
-rw-r--r--pkg/bundles/build.mk9
2 files changed, 61 insertions, 2 deletions
diff --git a/pkg/build_osx_bundle_with_venv.sh b/pkg/build_osx_bundle_with_venv.sh
new file mode 100755
index 00000000..370f6cca
--- /dev/null
+++ b/pkg/build_osx_bundle_with_venv.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+###########################################################
+# Build a Bitmask bundle inside a fresh virtualenv (OSX).
+# To be run by Gitlab Runner,
+# will produce an artifact for each build.
+###########################################################
+
+# Stop bundling in case of errors
+set -e
+
+VENV=venv
+
+echo "[+] BUILDING BITMASK BUNDLE..."
+echo "[+] GIT VERSION" `git describe`
+
+if [ ! -d "$VENV" ]; then
+ echo "[+] creating virtualenv in venv"
+ virtualenv $VENV
+fi
+source "$VENV"/bin/activate
+echo "[+] Using venv in" $VIRTUAL_ENV
+
+$VIRTUAL_ENV/bin/pip install -U pyinstaller==3.2.1
+$VIRTUAL_ENV/bin/pip install zope.interface zope.proxy
+
+# fix for #8789
+$VIRTUAL_ENV/bin/pip --no-cache-dir install pysqlcipher --install-option="--bundled"
+
+$VIRTUAL_ENV/bin/pip install -r pkg/requirements-osx.pip
+
+
+# XXX hack for the namespace package not being properly handled by pyinstaller
+# needed?
+# touch $VIRTUAL_ENV/lib/python2.7/site-packages/zope/__init__.py
+# touch $VIRTUAL_ENV/lib/python2.7/site-packages/leap/soledad/__init__.py
+
+make dev-gui
+make dev-mail
+
+# $VIRTUAL_ENV/bin/pip uninstall --yes leap.bitmask
+# $VIRTUAL_ENV/bin/python setup.py sdist bdist_wheel --universal
+
+echo "[+] Installing Bitmask from latest wheel..."
+$VIRTUAL_ENV/bin/pip install `ls -tr dist/*.whl | tail -n 1`
+
+# Get the bundled libzmq
+$VIRTUAL_ENV/bin/pip install -I pyzmq --install-option="--zmq=bundled"
+
+# Install bitmask in development mode
+$VIRTUAL_ENV/bin/pip install -e .
+
+# Get latest tags from repo
+git fetch --tags
+make bundle_osx
diff --git a/pkg/bundles/build.mk b/pkg/bundles/build.mk
index 1a2e7932..a941fdf4 100644
--- a/pkg/bundles/build.mk
+++ b/pkg/bundles/build.mk
@@ -3,7 +3,7 @@
OSX_RES = dist/Bitmask.app/Contents/Resources
OSX_CON = dist/Bitmask.app/Contents/MacOS
OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
-
+BUILD_RELEASE?=no
default:
echo "enter 'make bundle or make bundle_osx'"
@@ -81,7 +81,12 @@ bundle_osx_missing:
bundle_osx_pkg:
pkg/osx/quickpkg --output dist/Bitmask-$(NEXT_VERSION)_pre.pkg --scripts pkg/osx/scripts/ dist/Bitmask.app/
- productsign --sign $(OSX_CERT) dist/Bitmask-$(NEXT_VERSION)_pre.pkg dist/Bitmask-$(NEXT_VERSION).pkg
+ @if [ $(BUILD_RELEASE) = no ]; then\
+ echo "[!] BUILD_RELEASE=no, skipping signature";\
+ else\
+ echo "[+] Signing the bundle";\
+ productsign --sign $(OSX_CERT) dist/Bitmask-$(NEXT_VERSION)_pre.pkg dist/Bitmask-$(NEXT_VERSION).pkg;\
+ fi
bundle_linux: bundle bundle_linux_gpg bundle_linux_vpn bundle_linux_helpers