Build libcap tools for the selected target and check capability decoding
@@ -1,20 +1,18 @@
11; The capability name generator runs on the build host. The two libraries and
22; their command-line tools use the compiler and headers for the installed root.
33cap-make(part, goal, destination) := {
4- root := get-environment-variable("VINIX_SYSROOT")
54 run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",
65 "make", "-C", string-append("libcap-2.78/", part), goal, "prefix=/usr", "lib=lib",
7- string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs"),
8- "BUILD_CC=gcc", "PAM_CAP=no", "GOLANG=no", "USE_GPERF=no", "DYNAMIC=yes",
6+ "CC=vinix-cc", "BUILD_CC=cc", "PAM_CAP=no", "GOLANG=no", "USE_GPERF=no", "DYNAMIC=yes",
97 "CAPSH_SHELL=-DSHELL='\"/bin/sh\"'",
108 string-append("DESTDIR=", destination))
119}
1210defpkgbuild(libcap,
1311 #:pkgname, "libcap",
1412 #:pkgver, "2.78",
15- #:pkgrel, 1,
13+ #:pkgrel, 2,
1614 #:pkgdesc, "Linux process capabilities libraries, tools and headers",
17- #:arch, [#:x86-64],
15+ #:arch, [#:x86-64, #:aarch64],
1816 #:license, "BSD-3-Clause OR GPL-2.0-only",
1917 #:url, "https://sites.google.com/site/fullycapable/",
2018 #:depends, ["musl"],
@@ -25,6 +23,9 @@ defpkgbuild(libcap,
2523 cap-make("libcap", "all", "")
2624 cap-make("progs", "all", "")
2725 },
26+ #:check, fn() {
27+ run("vinix-run", "--library-path", "libcap-2.78/libcap", "libcap-2.78/progs/capsh", "--decode=1")
28+ },
2829 #:package, fn() {
2930 cap-make("libcap", "install", pkgdir())
3031 cap-make("progs", "install", pkgdir())