defpkgbuild(gpgme, #:pkgname, "gpgme", #:pkgver, "1.24.1", #:pkgrel, 1, #:pkgdesc, "GnuPG cryptography API for package signature verification", #:arch, [#:x86-64, #:aarch64], #:url, "https://gnupg.org/software/gpgme/", #:license, "LGPL-2.1-or-later", #:depends, ["musl", "libgpg-error", "libassuan"], ; The vpac runtime adds GnuPG for the OpenPGP engine. #:source, ["https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.24.1.tar.bz2", "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/community/gpgme/lfs64.patch", "context.c"], #:sha256sums, ["ea05d0258e71061d61716584ec34cef59330a91340571edc46b78374973ba85f", "12bebd3d827910a58d4348cd107e0698ed4bb89a2a704cae950548f10b1a0b78", "dc13a94a479b1fdeb3bb2062b72748a3f6e22f9dd5ffaa3cee235c00c5efe883"], #:prepare, fn() { run("patch", "--batch", "-d", "gpgme-1.24.1", "-p1", "-i", "../lfs64.patch") }, #:build, fn() { root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("vinix-configure", "gpgme-1.24.1/configure", "--enable-languages=", "--disable-gpg-test", string-append("--with-libgpg-error-prefix=", root, "/usr"), string-append("--with-libassuan-prefix=", root, "/usr")) run("make") }, #:check, fn() { run("vinix-cc", "-Isrc", "context.c", "-Lsrc/.libs", "-lgpgme", "-o", "context") run("vinix-run", "--library-path", "src/.libs", "./context") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir")) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "gpgme-1.24.1/COPYING.LESSER", string-append(pkgdir(), "/usr/share/licenses/gpgme/COPYING.LESSER")) })