vinix-ports / libseccomp / PKGBUILD.vile
33 lines · 33 sloc · 1.62 KB · d7c07d8d2662c86b2ccd53b86eac2460f42dbddf
Raw
1defpkgbuild(libseccomp,
2 #:pkgname, "libseccomp",
3 #:pkgver, "2.5.5",
4 #:pkgrel, 1,
5 #:pkgdesc, "Library and tools for Linux syscall filtering",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://github.com/seccomp/libseccomp",
8 #:license, "LGPL-2.1-or-later",
9 #:depends, ["musl"],
10 #:makedepends, ["linux-headers"],
11 #:source, ["https://github.com/seccomp/libseccomp/releases/download/v2.5.5/libseccomp-2.5.5.tar.gz",
12 "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/main/libseccomp/loongarch64.patch",
13 "remove-redefinition-prctl.patch", "check.py"],
14 #:sha256sums, ["248a2c8a4d9b9858aa6baf52712c34afefcf9c9e94b76dce02c1c9aa25fb3375",
15 "0b7c5782ebf6b996e16147f10b2e366fe75b6275ba589e043ec78ec7779cc651",
16 "3506ffadf6699b78164594b3615043233c9f57d9e6bde0418c552754a505f0dc",
17 "aeb5ec0522d3f9818369587a9a02305db2117db99744b193bed4eca475df157a"],
18 #:prepare, fn() {
19 run("patch", "--batch", "--fuzz=0", "-d", "libseccomp-2.5.5", "-p1", "-i", "../loongarch64.patch")
20 run("patch", "--batch", "--fuzz=0", "-d", "libseccomp-2.5.5", "-p1", "-i", "../remove-redefinition-prctl.patch")
21 },
22 #:build, fn() {
23 run("vinix-configure", "libseccomp-2.5.5/configure", "--disable-python")
24 run("make")
25 },
26 #:check, fn() {
27 run("python3", "check.py")
28 },
29 #:package, fn() {
30 run("make", "install", string-append("DESTDIR=", pkgdir()))
31 run("find", pkgdir(), "-name", "*.la", "-delete")
32 run("install", "-Dm644", "libseccomp-2.5.5/LICENSE", string-append(pkgdir(), "/usr/share/licenses/libseccomp/LICENSE"))
33 })
34