vinix-ports / libcap / PKGBUILD.vile
33 lines · 33 sloc · 1.47 KB · f046e5ffaf1b5e0e183846bb77bb219dd1bf96d5
Raw
1; The capability name generator runs on the build host. The two libraries and
2; their command-line tools use the compiler and headers for the installed root.
3cap-make(part, goal, destination) := {
4 run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",
5 "make", "-C", string-append("libcap-2.78/", part), goal, "prefix=/usr", "lib=lib",
6 "CC=vinix-cc", "BUILD_CC=cc", "PAM_CAP=no", "GOLANG=no", "USE_GPERF=no", "DYNAMIC=yes",
7 "CAPSH_SHELL=-DSHELL='\"/bin/sh\"'",
8 string-append("DESTDIR=", destination))
9}
10defpkgbuild(libcap,
11 #:pkgname, "libcap",
12 #:pkgver, "2.78",
13 #:pkgrel, 2,
14 #:pkgdesc, "Linux process capabilities libraries, tools and headers",
15 #:arch, [#:x86-64, #:aarch64],
16 #:license, "BSD-3-Clause OR GPL-2.0-only",
17 #:url, "https://sites.google.com/site/fullycapable/",
18 #:depends, ["musl"],
19 #:makedepends, ["linux-headers"],
20 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.24/libcap-2.78.tar.xz"],
21 #:sha256sums, ["0d621e562fd932ccf67b9660fb018e468a683d7b827541df27813228c996bb11"],
22 #:build, fn() {
23 cap-make("libcap", "all", "")
24 cap-make("progs", "all", "")
25 },
26 #:check, fn() {
27 run("vinix-run", "--library-path", "libcap-2.78/libcap", "libcap-2.78/progs/capsh", "--decode=1")
28 },
29 #:package, fn() {
30 cap-make("libcap", "install", pkgdir())
31 cap-make("progs", "install", pkgdir())
32 run("install", "-Dm644", "libcap-2.78/License", string-append(pkgdir(), "/usr/share/licenses/libcap/License"))
33 })
34