From f16377822f2b3b0f00bebf244d2dfb8fb1712344 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Wed, 31 Mar 2021 16:09:36 -0400 Subject: [PATCH] Add LibreJS license tag --- Makefile | 3 +++ javascript/olm_prefix.js | 4 ---- javascript/olm_prefix.js.in | 7 +++++++ javascript/olm_suffix.js | 2 ++ 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 javascript/olm_prefix.js create mode 100644 javascript/olm_prefix.js.in diff --git a/Makefile b/Makefile index 4371c63..a2fdafd 100644 --- a/Makefile +++ b/Makefile @@ -191,6 +191,9 @@ wasm: $(WASM_TARGET) $(WASM_TARGET): $(WASM_OBJECTS) $(EMAR) rcs $@ $^ +javascript/olm_prefix.js: javascript/olm_prefix.js.in Makefile + sed s/@VERSION@/$(VERSION)/ javascript/olm_prefix.js.in > $@ + # Note that the output file we give to emcc determines the name of the # wasm file baked into the js, hence messing around outputting to olm.js # and then renaming it. diff --git a/javascript/olm_prefix.js b/javascript/olm_prefix.js deleted file mode 100644 index ae2d9f9..0000000 --- a/javascript/olm_prefix.js +++ /dev/null @@ -1,4 +0,0 @@ -var Olm = (function() { -var olm_exports = {}; -var onInitSuccess; -var onInitFail; diff --git a/javascript/olm_prefix.js.in b/javascript/olm_prefix.js.in new file mode 100644 index 0000000..76031a9 --- /dev/null +++ b/javascript/olm_prefix.js.in @@ -0,0 +1,7 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 +// @source: https://gitlab.matrix.org/matrix-org/olm/-/tree/@VERSION@ + +var Olm = (function() { +var olm_exports = {}; +var onInitSuccess; +var onInitFail; diff --git a/javascript/olm_suffix.js b/javascript/olm_suffix.js index d6f72b7..dd2639a 100644 --- a/javascript/olm_suffix.js +++ b/javascript/olm_suffix.js @@ -34,3 +34,5 @@ if (typeof module === 'object') { // level wrapper class. module.exports = Olm; } + +// @license-end