; The capability name generator runs on the build host. The two libraries and ; their command-line tools use the compiler and headers for the installed root. cap-make(part, goal, destination) := { run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "-C", string-append("libcap-2.78/", part), goal, "prefix=/usr", "lib=lib", "CC=vinix-cc", "BUILD_CC=cc", "PAM_CAP=no", "GOLANG=no", "USE_GPERF=no", "DYNAMIC=yes", "CAPSH_SHELL=-DSHELL='\"/bin/sh\"'", string-append("DESTDIR=", destination)) } defpkgbuild(libcap, #:pkgname, "libcap", #:pkgver, "2.78", #:pkgrel, 2, #:pkgdesc, "Linux process capabilities libraries, tools and headers", #:arch, [#:x86-64, #:aarch64], #:license, "BSD-3-Clause OR GPL-2.0-only", #:url, "https://sites.google.com/site/fullycapable/", #:depends, ["musl"], #:makedepends, ["linux-headers"], #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.24/libcap-2.78.tar.xz"], #:sha256sums, ["0d621e562fd932ccf67b9660fb018e468a683d7b827541df27813228c996bb11"], #:build, fn() { cap-make("libcap", "all", "") cap-make("progs", "all", "") }, #:check, fn() { run("vinix-run", "--library-path", "libcap-2.78/libcap", "libcap-2.78/progs/capsh", "--decode=1") }, #:package, fn() { cap-make("libcap", "install", pkgdir()) cap-make("progs", "install", pkgdir()) run("install", "-Dm644", "libcap-2.78/License", string-append(pkgdir(), "/usr/share/licenses/libcap/License")) })