aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-homebrew-formula.py13
-rw-r--r--source/Makefile9
m---------source/sw/stm320
3 files changed, 16 insertions, 6 deletions
diff --git a/build-homebrew-formula.py b/build-homebrew-formula.py
index e82c1a5..c6aa0fa 100755
--- a/build-homebrew-formula.py
+++ b/build-homebrew-formula.py
@@ -40,14 +40,17 @@ class CryptechAlpha < Formula
end
def install
+
# Installation is a bit complex due to the way Homebrew handles
# Python library dependencies and due to our stuff being a mix of
# Python and C.
# Set PYTHONPATH to point to our private library location.
+
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
# Add all resources (and assume they are all Python, be careful...).
+
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
@@ -55,16 +58,20 @@ class CryptechAlpha < Formula
end
# Build everything.
- ohai "Building PKCS #11 code (including crypto and bignum libraries) from source, this is slow, sorry..."
+
+ ohai "Building PKCS #11 code (including crypto and bignum libraries) from source, this is slow, please be patient..."
ENV.deparallelize
system "make", "-C", "sw/pkcs11"
- # Install the Python script(s) then replace them with stubs which
- # set PYTHONPATH before calling the real script(s).
+ # Install the Python scripts, then replace them with stubs which
+ # set PYTHONPATH before calling the real scripts.
+
sbin.install "sw/stm32/projects/hsm/cryptech_upload"
+ sbin.install "sw/stm32/projects/hsm/cryptech_probe"
sbin.env_script_all_files(libexec/"sbin", :PYTHONPATH => ENV["PYTHONPATH"])
# Install other (non-Python) stuff, then we are done.
+
share.install "cryptech-alpha-firmware.tar.gz"
lib.install "sw/pkcs11/libpkcs11.dylib"
sbin.install "sw/pkcs11/p11util"
diff --git a/source/Makefile b/source/Makefile
index 173efac..3ffbb53 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -4,9 +4,11 @@
# part we just want to do the bare minimum needed for whatever
# software packaging system we use to work. At least for the moment,
# the primary packaging system is Debian-based, so this is written
-# to work in that environment. At some point we'll probably add
-# Homebrew support for Mac OS X.
-
+# to work in that environment.
+#
+# We also support Homebrew for MacOSX, using the source tarball
+# generated by the Debian packaging process, but the Homebrew formula
+# handles the build and installation for that environment.
all:
${MAKE} -C sw/pkcs11
@@ -21,5 +23,6 @@ install: all
install -D sw/pkcs11/p11util ${DESTDIR}/usr/sbin/p11util
install -D sw/pkcs11/libhal/cryptech_rpcd ${DESTDIR}/usr/sbin/cryptech_rpcd
install -D sw/stm32/projects/hsm/cryptech_upload ${DESTDIR}/usr/sbin/cryptech_upload
+ install -D sw/stm32/projects/hsm/cryptech_probe ${DESTDIR}/usr/sbin/cryptech_probe
# Still need scripts to do something useful with the firmware tarball
diff --git a/source/sw/stm32 b/source/sw/stm32
-Subproject d7e7dbc990aca690c069060bd39a168ffbd28e6
+Subproject 2334c43a39dcc7eba00811c36a9bc3362177a10