me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

libcap: build capability libraries and tools against the Vinix sysroot

diviocity committed 6 days ago · 1ce89ceba07fcbde450aad1d75ce70c6bb66e688 View patch
Unverified signature 1 files changed +32 -0
libcap/PKGBUILD.vile new file +32 -0

@@ -0,0 +1,32 @@

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.

3+cap-make(part, goal, destination) := {

4+ root := get-environment-variable("VINIX_SYSROOT")

5+ run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",

6+ "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",

9+ "CAPSH_SHELL=-DSHELL='\"/bin/sh\"'",

10+ string-append("DESTDIR=", destination))

11+}

12+defpkgbuild(libcap,

13+ #:pkgname, "libcap",

14+ #:pkgver, "2.78",

15+ #:pkgrel, 1,

16+ #:pkgdesc, "Linux process capabilities libraries, tools and headers",

17+ #:arch, [#:x86-64],

18+ #:license, "BSD-3-Clause OR GPL-2.0-only",

19+ #:url, "https://sites.google.com/site/fullycapable/",

20+ #:depends, ["musl"],

21+ #:makedepends, ["linux-headers"],

22+ #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.24/libcap-2.78.tar.xz"],

23+ #:sha256sums, ["0d621e562fd932ccf67b9660fb018e468a683d7b827541df27813228c996bb11"],

24+ #:build, fn() {

25+ cap-make("libcap", "all", "")

26+ cap-make("progs", "all", "")

27+ },

28+ #:package, fn() {

29+ cap-make("libcap", "install", pkgdir())

30+ cap-make("progs", "install", pkgdir())

31+ run("install", "-Dm644", "libcap-2.78/License", string-append(pkgdir(), "/usr/share/licenses/libcap/License"))

32+ })