From 6cf1751a4231d6454e69641655b6c5ea848bff6d Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 27 Sep 2016 15:25:15 -0400 Subject: [pkg] make bundle from main makefile --- .gitignore | 3 ++- Makefile | 5 +++++ pkg/next-version | 1 + pkg/pyinst/Makefile | 14 +------------- pkg/pyinst/build.mk | 24 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 pkg/next-version create mode 100644 pkg/pyinst/build.mk diff --git a/.gitignore b/.gitignore index a2f4b4e..c0e25a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -### Python ### +## Python ### # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -45,3 +45,4 @@ ui/pydist/leap/bitmask_js # PyInstaller pkg/pyinst/dist/ pkg/pyinst/build/ +pkg/launcher/bitmask diff --git a/Makefile b/Makefile index 49472bb..d15c5b8 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,8 @@ +DIST=dist/bitmask +NEXT_VERSION = $(shell cat pkg/next-version) +DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ +include pkg/pyinst/build.mk + clean: find . -type f -name "*.py[co]" -delete find . -type d -name "__pycache__" -delete diff --git a/pkg/next-version b/pkg/next-version new file mode 100644 index 0000000..1c1584f --- /dev/null +++ b/pkg/next-version @@ -0,0 +1 @@ +0.9.4rc1 diff --git a/pkg/pyinst/Makefile b/pkg/pyinst/Makefile index e8d52f8..1acde6d 100644 --- a/pkg/pyinst/Makefile +++ b/pkg/pyinst/Makefile @@ -1,13 +1 @@ -build: clean - pyinstaller -y app.spec - cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/_scrypt.so dist/bitmask/ - cp ../../src/leap/bitmask/core/bitmaskd.tac dist/bitmask - mkdir dist/bitmask/leap - cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/leap/bitmask_js/ dist/bitmask/leap - mv dist/bitmask lib && mkdir dist/bitmask && mv lib dist/bitmask/lib - cd ../launcher && make - cp ../launcher/bitmask dist/bitmask/ - -clean: - rm -rf dist build - +include build.mk diff --git a/pkg/pyinst/build.mk b/pkg/pyinst/build.mk new file mode 100644 index 0000000..ea82f9f --- /dev/null +++ b/pkg/pyinst/build.mk @@ -0,0 +1,24 @@ +# This makefile should be called from the topmost bitmask folder +# +bundle: bundle_clean + pyinstaller -y pkg/pyinst/app.spec + cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/_scrypt.so $(DIST) + cp src/leap/bitmask/core/bitmaskd.tac $(DIST) + mkdir $(DIST)/leap + cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/leap/bitmask_js/ $(DIST)/leap + mv $(DIST) _bundlelib && mkdir $(DIST_VERSION) && mv _bundlelib $(DIST_VERSION)/lib + cd pkg/launcher && make + cp pkg/launcher/bitmask $(DIST_VERSION) + +bundle_tar: + cd dist/ && tar cvzf Bitmask.$(NEXT_VERSION).tar.gz bitmask-$(NEXT_VERSION) + +bundle_sign: + gpg2 -a --sign --detach-sign dist/Bitmask.$(NEXT_VERSION).tar.gz + +bundle_upload: + rsync --rsh='ssh' -avztlpog --progress --partial dist/Bitmask.$(NEXT_VERSION).* salmon.leap.se:./ + +bundle_clean: + rm -rf dist build + -- cgit v1.2.3