Add sha-2 (commit 61155d)

Unfortunatley the sha2 project does not have versioned releases so we
use the latest commit.

We have also manually added a frontend to sha-2 to allow us to invoke
it from the command line, thanks bittrof for the help!
This commit is contained in:
fosslinux 2021-02-15 19:33:12 +11:00
parent 44bad278e0
commit 92cb05442e
8 changed files with 232 additions and 18 deletions

View file

@ -0,0 +1,30 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
cd build
# Extract
gunzip ../src/${pkg}.tar.gz
tar xf ../src/${pkg}.tar
cd sha-2-61555d45676473e77c11f8da97301e2d2b865871
# Patch
patch -Np0 -i ../../patches/frontend.patch
# Compile
tcc -c -o sha-256.o sha-256.c
# Link
tcc -static -o ${bindir}/sha256sum sha-256.o
# No test avaliable
cd ../..
# Checksums
fletcher16 checksums