summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2017-08-05 15:20:48 -0700
committerKali Kaneko <kali@leap.se>2017-08-14 18:09:36 -0400
commit7e89e670ec0baac063c52c4f6d3690eb6e6130ad (patch)
tree44fb4c44be22f891f3b9a62dd5da3aef3544cdbb
parent736c57502d75dbf0d1780260f8788425403d25e6 (diff)
[pkg] move bundling scripts
-rw-r--r--Makefile10
-rw-r--r--pkg/bundles/README.rst13
-rw-r--r--pkg/bundles/build.mk (renamed from pkg/pyinst/build.mk)15
-rw-r--r--pkg/bundles/win_postbuild.bat (renamed from pkg/pyinst/win_postbuild.bat)0
-rw-r--r--pkg/pyinst/Makefile1
5 files changed, 25 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 95aa8403..347c4083 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,7 @@
DIST=dist/bitmask
NEXT_VERSION = $(shell cat pkg/next-version)
DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/
-OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
-include pkg/pyinst/build.mk
+include pkg/bundles/build.mk
include pkg/thirdparty/openvpn/build.mk
dev-bootstrap:
@@ -70,13 +69,6 @@ bundle_in_docker:
docker_container:
cd pkg/docker_bundle && docker build -t mybundle .
-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
-
-cleanpkg:
- rm -rf dist build
-
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
diff --git a/pkg/bundles/README.rst b/pkg/bundles/README.rst
new file mode 100644
index 00000000..d7754355
--- /dev/null
+++ b/pkg/bundles/README.rst
@@ -0,0 +1,13 @@
+bundle utilities
+----------------
+In this folder there are several makefile/batch scripts that are used during
+the bundling process.
+
+The bundles are first generated by PyInstaller (using the spec file in
+``pkg/pyinst``), and then we arrange the various helpers in a way that is
+specific to every platform.
+
+The scripts in this folder are expected to be called from the root folder of
+the project, and therefore all the paths are relative paths to the root folder.
+
+
diff --git a/pkg/pyinst/build.mk b/pkg/bundles/build.mk
index 2ad224b4..158293b1 100644
--- a/pkg/pyinst/build.mk
+++ b/pkg/bundles/build.mk
@@ -2,6 +2,7 @@
#
OSX_RES = dist/Bitmask.app/Contents/Resources
OSX_CON = dist/Bitmask.app/Contents/MacOS
+OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
default:
@@ -51,10 +52,7 @@ bundle_osx_helpers:
cp -r pkg/osx/daemon $(DIST_VERSION)/apps/helpers/
cp -r pkg/osx/openvpn $(DIST_VERSION)/apps/helpers/
-
-bundle_linux: bundle bundle_linux_gpg bundle_linux_vpn bundle_linux_helpers
-
-bundle_osx: bundle bundle_osx_helpers
+bundle_osx_missing:
cp $(DIST_VERSION)/lib/_scrypt.so $(OSX_CON)/
cp $(DIST_VERSION)/lib/bitmaskd.tac $(OSX_CON)/
cp -r $(DIST_VERSION)/lib/leap $(OSX_CON)/
@@ -68,6 +66,15 @@ bundle_osx: bundle bundle_osx_helpers
wget https://downloads.leap.se/thirdparty/osx/openvpn/openvpn -O $(OSX_RES)/openvpn.leap
chmod +x $(OSX_RES)/openvpn.leap
+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
+
+
+bundle_linux: bundle bundle_linux_gpg bundle_linux_vpn bundle_linux_helpers
+
+bundle_osx: bundle bundle_osx_helpers bundle_osx_missing bundle_osx_pkg
+
bundle_win:
pyinstaller -y pkg/pyinst/app.spec
cp ${VIRTUAL_ENV}/Lib/site-packages/_scrypt.pyd $(DIST)
diff --git a/pkg/pyinst/win_postbuild.bat b/pkg/bundles/win_postbuild.bat
index c4d9fb01..c4d9fb01 100644
--- a/pkg/pyinst/win_postbuild.bat
+++ b/pkg/bundles/win_postbuild.bat
diff --git a/pkg/pyinst/Makefile b/pkg/pyinst/Makefile
deleted file mode 100644
index 1acde6dc..00000000
--- a/pkg/pyinst/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-include build.mk