vinix-ports / ports / nghttp2 / PKGBUILD.vile
25 lines · 25 sloc · 1.05 KB · c33d8afc2906b8dd9a8b905224eccd49a44f7ad5
Raw
1defpkgbuild(nghttp2,
2 #:pkgname, "nghttp2",
3 #:pkgver, "1.69.0",
4 #:pkgrel, 1,
5 #:pkgdesc, "HTTP/2 client and server protocol library",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://nghttp2.org/",
8 #:license, "MIT",
9 #:depends, ["musl"],
10 #:source, ["https://github.com/nghttp2/nghttp2/releases/download/v1.69.0/nghttp2-1.69.0.tar.xz"],
11 #:sha256sums, ["1fb324b6ec2c56f6bde0658f4139ffd8209fa9e77ce98fd7a5f63af8d0e508ad"],
12 #:build, fn() {
13 run("vinix-configure", "nghttp2-1.69.0/configure", "--enable-lib-only")
14 run("make")
15 },
16 #:check, fn() {
17 run("vinix-cc", "-Inghttp2-1.69.0/lib/includes", "-Ilib/includes", "nghttp2-1.69.0/examples/deflate.c",
18 "-Llib/.libs", "-lnghttp2", "-o", "hpack-roundtrip")
19 run("vinix-run", "--library-path", "lib/.libs", "./hpack-roundtrip")
20 },
21 #:package, fn() {
22 run("make", "install", string-append("DESTDIR=", pkgdir()))
23 run("find", pkgdir(), "-name", "*.la", "-delete")
24 run("install", "-Dm644", "nghttp2-1.69.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/nghttp2/COPYING"))
25 })
26