defpkgbuild(libgcrypt, #:pkgname, "libgcrypt", #:pkgver, "1.10.3", #:pkgrel, 1, #:pkgdesc, "Cryptographic primitives for GnuPG", #:arch, [#:x86-64, #:aarch64], #:url, "https://www.gnupg.org/software/libgcrypt/", #:license, "LGPL-2.1-or-later AND GPL-2.0-or-later", #:depends, ["musl", "libgpg-error"], #:source, ["https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.3.tar.bz2"], #:sha256sums, ["8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa"], #:build, fn() { root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("vinix-configure", "libgcrypt-1.10.3/configure", string-append("--with-libgpg-error-prefix=", root, "/usr")) run("make") }, #:check, fn() { run("vinix-run", "--library-path", "src/.libs", "tests/version") run("vinix-run", "--library-path", "src/.libs", "tests/t-sexp") run("vinix-run", "--library-path", "src/.libs", "tests/aeswrap") run("vinix-run", "--library-path", "src/.libs", "tests/t-kdf") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "libgcrypt-1.10.3/COPYING.LIB", string-append(pkgdir(), "/usr/share/licenses/libgcrypt/COPYING.LIB")) })