vinix-ports / nettle / PKGBUILD.vile
28 lines · 28 sloc · 1.31 KB · 31530361438298f32a197e9aea609eca486ee278
Raw
1defpkgbuild(nettle,
2 #:pkgname, "nettle",
3 #:pkgver, "3.10.2",
4 #:pkgrel, 1,
5 #:pkgdesc, "Nettle and Hogweed cryptographic libraries and utilities",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://www.lysator.liu.se/~nisse/nettle/",
8 #:license, "GPL-2.0-or-later OR LGPL-3.0-or-later",
9 #:depends, ["musl", "gmp"],
10 #:source, ["https://ftp.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz"],
11 #:sha256sums, ["fe9ff51cb1f2abb5e65a6b8c10a92da0ab5ab6eaf26e7fc2b675c45f1fb519b5"],
12 #:build, fn() {
13 run("vinix-configure", "nettle-3.10.2/configure", "--enable-fat", "--enable-shared", "--enable-static", "--disable-openssl")
14 run("make")
15 },
16 #:check, fn() {
17 run("make", "-C", "testsuite", "sha256-test", "rsa-test")
18 run("make", "install", string-append("DESTDIR=", srcdir(), "/check-root"))
19 run("vinix-run", "--library-path", "check-root/usr/lib", "testsuite/sha256-test")
20 run("vinix-run", "--library-path", "check-root/usr/lib", "testsuite/rsa-test")
21 },
22 #:package, fn() {
23 run("make", "install", string-append("DESTDIR=", pkgdir()))
24 run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir"))
25 for-each(fn(file) {
26 run("install", "-Dm644", string-append("nettle-3.10.2/", file), string-append(pkgdir(), "/usr/share/licenses/nettle/", file))
27 }, list("COPYINGv2", "COPYING.LESSERv3"))
28 })
29