| 1 | defpkgbuild(libuuid, |
| 2 | #:pkgname, "libuuid", |
| 3 | #:pkgver, "2.40.4", |
| 4 | #:pkgrel, 1, |
| 5 | #:pkgdesc, "UUID library and development files from util-linux", |
| 6 | #:arch, [#:x86-64], |
| 7 | #:license, "BSD-3-Clause", |
| 8 | #:url, "https://www.kernel.org/pub/linux/utils/util-linux/", |
| 9 | #:depends, ["musl"], |
| 10 | #:makedepends, ["linux-headers"], |
| 11 | #:source, ["https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.4.tar.xz"], |
| 12 | #:sha256sums, ["5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79"], |
| 13 | |
| 14 | #:build, fn() { |
| 15 | root := get-environment-variable("VPAC_MAKEPKG_ROOT") |
| 16 | run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", |
| 17 | "CC=vinix-cc", |
| 18 | "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"), |
| 19 | string-append("PKG_CONFIG_SYSROOT_DIR=", root), |
| 20 | "util-linux-2.40.4/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", |
| 21 | "--prefix=/usr", "--disable-all-programs", "--enable-libuuid", "--without-python", |
| 22 | "--disable-nls", "--disable-asciidoc") |
| 23 | run("make", "libuuid.la", "libuuid/uuid.pc") |
| 24 | }, |
| 25 | #:check, fn() { |
| 26 | root := get-environment-variable("VPAC_MAKEPKG_ROOT") |
| 27 | run("make", "test_uuid_parser") |
| 28 | run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs", ".libs/test_uuid_parser") |
| 29 | }, |
| 30 | #:package, fn() { |
| 31 | run("install", "-d", string-append(pkgdir(), "/usr/lib")) |
| 32 | run("./libtool", "--mode=install", "install", "-c", "libuuid.la", string-append(pkgdir(), "/usr/lib/")) |
| 33 | run("rm", string-append(pkgdir(), "/usr/lib/libuuid.la")) |
| 34 | run("install", "-Dm644", "util-linux-2.40.4/libuuid/src/uuid.h", string-append(pkgdir(), "/usr/include/uuid/uuid.h")) |
| 35 | run("install", "-Dm644", "libuuid/uuid.pc", string-append(pkgdir(), "/usr/lib/pkgconfig/uuid.pc")) |
| 36 | run("install", "-Dm644", "util-linux-2.40.4/Documentation/licenses/COPYING.BSD-3-Clause", |
| 37 | string-append(pkgdir(), "/usr/share/licenses/libuuid/COPYING")) |
| 38 | }) |
| 39 | |