vinix-ports / ports / libxau / PKGBUILD.vile
28 lines · 26 sloc · 1.17 KB · c33d8afc2906b8dd9a8b905224eccd49a44f7ad5
Raw
1selected := get-environment-variable("VPAC_TARGET_ARCH")
2arch := if string?(selected) { selected } else if memq(string->symbol("aarch64"), features()) { "aarch64" } else { "x86_64" }
3
4defpkgbuild(libxau,
5 #:pkgname, "libxau",
6 #:pkgver, "1.0.11",
7 #:pkgrel, if string=?("aarch64", arch) { 3 } else { 2 },
8 #:pkgdesc, "X11 authorization library",
9 #:arch, [#:x86-64, #:aarch64],
10 #:license, "MIT",
11 #:url, "https://xorg.freedesktop.org/",
12 #:depends, if string=?("aarch64", arch) { ["musl>=1.2.6-4", "xorgproto"] } else { ["musl", "xorgproto"] },
13 #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libXau-1.0.11.tar.xz"],
14 #:sha256sums, ["f3fa3282f5570c3f6bd620244438dbfbdd580fc80f02f549587a0f8ab329bbeb"],
15
16 #:build, fn() {
17 run("vinix-configure", "libXau-1.0.11/configure")
18 run("make")
19 },
20 #:check, fn() {
21 run("make", "Autest")
22 run("vinix-run", "--library-path", ".libs", ".libs/Autest")
23 },
24 #:package, fn() {
25 run("make", "install", string-append("DESTDIR=", pkgdir()))
26 run("find", pkgdir(), "-name", "*.la", "-delete")
27 run("install", "-Dm644", "libXau-1.0.11/COPYING", string-append(pkgdir(), "/usr/share/licenses/libxau/COPYING"))
28 })
29