vinix-ports / ca-certificates / PKGBUILD.vile
33 lines · 33 sloc · 2.11 KB
Raw
1defpkgbuild(ca-certificates,
2 #:pkgname, "ca-certificates",
3 #:pkgver, "20261020",
4 #:pkgrel, 1,
5 #:pkgdesc, "Update the system trust store and hash locally installed authorities",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://gitlab.alpinelinux.org/alpine/ca-certificates",
8 #:license, "MPL-2.0 AND MIT",
9 #:depends, ["musl", "openssl", "busybox", "ca-certificates-bundle=20261020"],
10 #:backup, ["etc/ca-certificates.conf"],
11 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/ca-certificates-20261020.tar.bz2", "make-config.py", "certhash"],
12 #:sha256sums, ["1048bc7f50fa42a6621bc2f8816173f89a0c0098f26dff072bc8fe40af714400",
13 "10e3a6fbeca47340c6e50bff0cd06328f28a36161609fc0bd23d90a80e8e5bc8", "dcdcc8690bcb948d9cf90da1f3e6c504273bd13d560edc7482f141ff17acd76a"],
14 #:build, fn() {
15 run("make", "-C", "ca-certificates-20261020", "CC=vinix-cc", "update-ca-certificates", "c_rehash")
16 run("python3", "make-config.py")
17 },
18 #:check, fn() {
19 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
20 run("mkdir", "checked")
21 run("cp", string-append(root, "/usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt"), "checked/test.crt")
22 run("vinix-run", "ca-certificates-20261020/c_rehash", "checked")
23 run("vinix-run", string-append(root, "/usr/bin/openssl"), "verify", "-no-CAfile", "-no-CAstore", "-no_check_time",
24 "-CApath", "checked", "checked/test.crt")
25 },
26 #:package, fn() {
27 run("install", "-Dm755", "ca-certificates-20261020/update-ca-certificates", string-append(pkgdir(), "/usr/sbin/update-ca-certificates"))
28 run("install", "-Dm755", "ca-certificates-20261020/c_rehash", string-append(pkgdir(), "/usr/bin/c_rehash"))
29 run("install", "-Dm755", "certhash", string-append(pkgdir(), "/etc/ca-certificates/update.d/certhash"))
30 run("install", "-Dm644", "ca-certificates.conf", string-append(pkgdir(), "/etc/ca-certificates.conf"))
31 run("install", "-Dm644", "ca-certificates-20261020/update-ca-certificates.8", string-append(pkgdir(), "/usr/share/man/man8/update-ca-certificates.8"))
32 run("mkdir", "-p", string-append(pkgdir(), "/usr/local/share/ca-certificates"))
33 })
34