| 1 | defpkgbuild(jansson, |
| 2 | #:pkgname, "jansson", |
| 3 | #:pkgver, "2.14", |
| 4 | #:pkgrel, 1, |
| 5 | #:pkgdesc, "JSON encoding, decoding and data manipulation", |
| 6 | #:arch, [#:x86-64, #:aarch64], |
| 7 | #:url, "https://digip.org/jansson/", |
| 8 | #:license, "MIT", |
| 9 | #:depends, ["musl"], |
| 10 | #:source, ["https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz"], |
| 11 | #:sha256sums, ["5798d010e41cf8d76b66236cfb2f2543c8d082181d16bc3085ab49538d4b9929"], |
| 12 | #:build, fn() { |
| 13 | run("vinix-configure", "jansson-2.14/configure") |
| 14 | run("make") |
| 15 | }, |
| 16 | #:check, fn() { |
| 17 | run("vinix-cc", "-Isrc", "-Ijansson-2.14/src", "jansson-2.14/test/suites/api/test_load.c", |
| 18 | "-Lsrc/.libs", "-ljansson", "-o", "test-load") |
| 19 | run("vinix-run", "--library-path", "src/.libs", "./test-load") |
| 20 | }, |
| 21 | #:package, fn() { |
| 22 | run("make", "install", string-append("DESTDIR=", pkgdir())) |
| 23 | run("find", pkgdir(), "-name", "*.la", "-delete") |
| 24 | run("install", "-Dm644", "jansson-2.14/LICENSE", string-append(pkgdir(), "/usr/share/licenses/jansson/LICENSE")) |
| 25 | }) |
| 26 | |