From 31530361438298f32a197e9aea609eca486ee278 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 01:25:10 +0100 Subject: [PATCH] Build Nettle and Hogweed with target SHA and RSA checks --- nettle/PKGBUILD.vile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nettle/PKGBUILD.vile diff --git a/nettle/PKGBUILD.vile b/nettle/PKGBUILD.vile new file mode 100644 index 0000000..50518b5 --- /dev/null +++ b/nettle/PKGBUILD.vile @@ -0,0 +1,28 @@ +defpkgbuild(nettle, + #:pkgname, "nettle", + #:pkgver, "3.10.2", + #:pkgrel, 1, + #:pkgdesc, "Nettle and Hogweed cryptographic libraries and utilities", + #:arch, [#:x86-64, #:aarch64], + #:url, "https://www.lysator.liu.se/~nisse/nettle/", + #:license, "GPL-2.0-or-later OR LGPL-3.0-or-later", + #:depends, ["musl", "gmp"], + #:source, ["https://ftp.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz"], + #:sha256sums, ["fe9ff51cb1f2abb5e65a6b8c10a92da0ab5ab6eaf26e7fc2b675c45f1fb519b5"], + #:build, fn() { + run("vinix-configure", "nettle-3.10.2/configure", "--enable-fat", "--enable-shared", "--enable-static", "--disable-openssl") + run("make") + }, + #:check, fn() { + run("make", "-C", "testsuite", "sha256-test", "rsa-test") + run("make", "install", string-append("DESTDIR=", srcdir(), "/check-root")) + run("vinix-run", "--library-path", "check-root/usr/lib", "testsuite/sha256-test") + run("vinix-run", "--library-path", "check-root/usr/lib", "testsuite/rsa-test") + }, + #:package, fn() { + run("make", "install", string-append("DESTDIR=", pkgdir())) + run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir")) + for-each(fn(file) { + run("install", "-Dm644", string-append("nettle-3.10.2/", file), string-append(pkgdir(), "/usr/share/licenses/nettle/", file)) + }, list("COPYINGv2", "COPYING.LESSERv3")) + }) -- 2.56.1