diff options
author | Cem Keylan <cem@ckyln.com> | 2020-09-03 10:41:58 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-09-03 10:41:58 +0300 |
commit | 3cceddcb018981b11928b8fba08ae1dab8a9f251 (patch) | |
tree | e504f9736fe933bcad7b4d684f29640d11517667 /extra/bearssl/build | |
parent | 1deaf71307f914f5c56879c32d90a510569096db (diff) | |
download | repository-3cceddcb018981b11928b8fba08ae1dab8a9f251.tar.gz |
bearssl: move to extra
Diffstat (limited to 'extra/bearssl/build')
-rwxr-xr-x | extra/bearssl/build | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/bearssl/build b/extra/bearssl/build new file mode 100755 index 00000000..21bbd789 --- /dev/null +++ b/extra/bearssl/build @@ -0,0 +1,29 @@ +#!/bin/sh -e + +for patch in *.patch; do + patch -p1 < "$patch" +done + +kinstall() { + mkdir -p "${3%/*}"; cp "$2" "$3" + chmod "$1" "$3" +} + +make + +# Build static binary for bearssl, word splitting on CFLAGS is intentional. +# shellcheck disable=2086 +"${CC:-cc}" \ + -static $CFLAGS \ + -I ./inc \ + -include tools/brssl.h \ + tools/*.c \ + build/libbearssl.a \ + -o brssl + + +kinstall 755 brssl "$1/usr/bin/brssl" +kinstall 644 build/libbearssl.a "$1/usr/lib/libbearssl.a" +kinstall 755 build/libbearssl.so "$1/usr/lib/libbearssl.so" + +mv inc "$1/usr/include" |