vinix-ports / ports / libbsd / PKGBUILD.vile
27 lines · 27 sloc · 1.2 KB · c33d8afc2906b8dd9a8b905224eccd49a44f7ad5
Raw
1defpkgbuild(libbsd,
2 #:pkgname, "libbsd",
3 #:pkgver, "0.12.2",
4 #:pkgrel, 2,
5 #:pkgdesc, "BSD library functions and development headers",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://libbsd.freedesktop.org/",
8 ; Upstream COPYING itemizes the BSD variants and additional notices by file.
9 #:license, ["BSD-2-Clause", "BSD-3-Clause", "Beerware", "ISC", "MIT", "LicenseRef-libbsd-COPYING"],
10 #:depends, ["musl", "libmd", "bsd-compat-headers"],
11 #:makedepends, ["linux-headers"],
12 #:source, ["https://libbsd.freedesktop.org/releases/libbsd-0.12.2.tar.xz"],
13 #:sha256sums, ["b88cc9163d0c652aaf39a99991d974ddba1c3a9711db8f1b5838af2a14731014"],
14 #:build, fn() {
15 run("vinix-configure", "libbsd-0.12.2/configure")
16 run("make")
17 },
18 #:check, fn() {
19 run("make", "-C", "test", "endian", "overlay")
20 run("vinix-run", "--library-path", "src/.libs", "test/.libs/endian")
21 run("vinix-run", "--library-path", "src/.libs", "test/.libs/overlay")
22 },
23 #:package, fn() {
24 run("make", "install", string-append("DESTDIR=", pkgdir()))
25 run("find", pkgdir(), "-name", "*.la", "-delete")
26 run("install", "-Dm644", "libbsd-0.12.2/COPYING", string-append(pkgdir(), "/usr/share/licenses/libbsd/COPYING"))
27 })
28