diff options
Diffstat (limited to 'build-homebrew-formula.py')
-rwxr-xr-x | build-homebrew-formula.py | 13 |
1 files changed, 10 insertions, 3 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" |