Compare commits

...

3 Commits

Author SHA1 Message Date
Ulf Wiger
f6d3c78420 update zompify script, remove post hook 2025-05-14 09:20:50 +02:00
Ulf Wiger
b9f214a49d Add ebin/enoise.app 2025-04-24 22:26:59 +02:00
Ulf Wiger
ce950b2331 Zompify 2025-04-24 16:47:44 +02:00
6 changed files with 80 additions and 9 deletions

2
.gitignore vendored
View File

@ -7,7 +7,7 @@ _*
*.swp
*.swo
.erlang.cookie
ebin
ebin/*.beam
log
erl_crash.dump
.rebar

1
Emakefile Normal file
View File

@ -0,0 +1 @@
{"src/*", [debug_info, {i, "include/"}, {outdir, "ebin/"}]}.

15
LICENSE
View File

@ -1,15 +1,14 @@
ISC License
Copyright (c) 2018, aeternity developers
Copyright 2025 Aeternity Anstalt, QPQ AG <ulf@wiger.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

12
ebin/enoise.app Normal file
View File

@ -0,0 +1,12 @@
{application,enoise,
[{description,"Noise protocol"},
{vsn,"1.3.0"},
{registered,[]},
{applications,[kernel,stdlib,crypto]},
{env,[]},
{modules,[enoise,enoise_cipher_state,enoise_connection,
enoise_crypto,enoise_hs_state,enoise_keypair,
enoise_protocol,enoise_sym_state]},
{maintainers,["Hans Svensson"]},
{licenses,["ISC"]},
{links,[{"Github","https://github.com/aeternity/enoise"}]}]}.

17
zomp.meta Normal file
View File

@ -0,0 +1,17 @@
{name,"enoise"}.
{type,app}.
{modules,[]}.
{prefix,"enoise"}.
{desc,"Noise protocol"}.
{author,"Hans Svensson, QPQ AG"}.
{package_id,{"uwiger","enoise",{1,3,0}}}.
{deps,[]}.
{key_name,none}.
{a_email,"ulf@wiger.net"}.
{c_email,"ulf@wiger.net"}.
{copyright,"Aeternity Anstalt, QPQ AG"}.
{file_exts,[]}.
{license,"ISC"}.
{repo_url,"https://git.qpq.swiss/QPQ-AG/enoise"}.
{tags,[]}.
{ws_url,[]}.

42
zompify.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
set -e
APP=$(basename "$PWD")
SRC="_build/default/lib/$APP"
DST="$PWD/_build/zomp/lib/$APP"
IGNORE_FILE="zomp.ignore"
mkdir -p "$DST"
# Remove broken symlinks
find "$SRC" -type l ! -exec test -e {} \; -delete || true
# Build ignore matcher
IGNORE_TEMP=$(mktemp)
trap "rm -f $IGNORE_TEMP" EXIT
# Expand globs in zomp.ignore to patterns suitable for grep
if [ -e "$IGNORE_FILE" ]; then
grep -v '^\s*#' "$IGNORE_FILE" | sed 's#/#\\/#g' | sed 's/\./\\./g' | sed 's/\*/.*/g' > "$IGNORE_TEMP"
fi
# Copy Git-tracked and Zomp-allowed files
git ls-files -z | while IFS= read -r -d '' file; do
# Skip if ignored
echo "$file" | grep -Eq -f "$IGNORE_TEMP" && continue
# Only copy if file exists in the build dir
if [ -e "$SRC/$file" ]; then
mkdir -p "$DST/$(dirname "$file")"
cp -a "$SRC/$file" "$DST/$file"
fi
done
rm "$IGNORE_TEMP"
# Copy metadata
cp "$PWD/zomp.meta" "$DST/"
cp "$PWD/Emakefile" "$DST/"
# Clean up beam files just in case
[ -d "$DST/ebin" ] && find "$DST/ebin" -name '*.beam' -exec rm -f {} + || true