mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit 50a4ce9c12fd81ee73fd09d99a2439aeb1893cce
parent 7fc1daa4fcfc0a21aa7e4a783893565adfff96fc
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Tue,  4 Nov 2025 02:12:47 +0000

ocaml packages

Diffstat:
Atemplates/pkg/ocaml-fmt | 19+++++++++++++++++++
Avariants/ccx-x86_64/ocaml-fmt | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Avariants/root-x86_64/ocaml-fmt | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 225 insertions(+), 0 deletions(-)

diff --git a/templates/pkg/ocaml-fmt b/templates/pkg/ocaml-fmt @@ -0,0 +1,19 @@ +{%- set pkg_version="0.9.0" -%} +{%- set upstream_name="fmt" -%} +{%- set pkg_source="tbz" -%} +{% extends "topkg" %} +{% block package_deps -%} +#+{{pkg_install_name("ocaml-topkg")}} +{% endblock package_deps %} +{% block genlinks_begin %} + x["./library.ocaml/fmt/fmt.a"]=1 + x["./library.ocaml/fmt/fmt.cma"]=1 + x["./library.ocaml/fmt/fmt.cmi"]=1 + # x["./library.ocaml/fmt/fmt.cmt"]=1 + x["./library.ocaml/fmt/fmt.cmti"]=1 + x["./library.ocaml/fmt/fmt.cmx"]=1 + x["./library.ocaml/fmt/fmt.cmxa"]=1 + # x["./library.ocaml/fmt/fmt.cmxs"]=1 + # x["./library.ocaml/fmt/fmt.ml"]=1 + x["./library.ocaml/fmt/fmt.mli"]=1 +{% endblock genlinks_begin %} diff --git a/variants/ccx-x86_64/ocaml-fmt b/variants/ccx-x86_64/ocaml-fmt @@ -0,0 +1,103 @@ +#!/usr/bin/env pthbs-build +#+busybox.47c820e8cf3f700bf5b693d7d379272d485e5078b2036912ce2e01bb998caf1f +#+busybox-findutils.79fab8ce17646e27c958348822c367903ddbef44dcebb134d16caa4fc287b716 +#+busybox-awk.6efe6e8726ffa7c47dc117be114219675ccea315e4e29685e40a06b61d249f9b +#+busybox-diffutils.f40ac7713836b6eaa4e46db3b7577b533f4738fb10bf732edc044ffc48eb9ec8 +#+musl-cross-make.e4735d8572f9b6654a7381ebdfbd62e665d1d1da5e06a56923e89274cc6a510f +#+ocaml.b8790b4e31ab26a55165b60c745d8789addca32a91a851444cbf36abe8c19dc5 +#+ocaml-findlib.fe147b0c821388c1663dcf058bfea31504d7bdf2af5161104aa5a20f821446a9 +#+ocamlbuild.af1e7c1126b473143018d4844d1142ae30a23db6b8c435f28ba21bbe015b03f8 +#+opam.714997e34c97a27678ee9a24f03256bbda3ac9e44597b10f56c795f37a17e989 +#+ocaml-topkg.c440f7f2689ef8ddaa0eceddf419d4d07f17675741ee871d9f017d268b91a1ef +#@untar:-j:sha256:f1fb20805a22dd75a137d72704a370e7789cf6bdf63948e6817d1c226c141261:. + + +# - build script start - + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'fmt-0.9.0' + + + +ocaml -I "$OCAMLPATH" pkg/pkg.ml build + + + opam-installer -i \ + --prefix="$dest" \ + --libdir="$dest/library.ocaml" \ + --mandir="$dest/man" \ + --docdir="$dest/doc/ocaml-fmt" + + + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library.ocaml/fmt/fmt.a"]=1 + x["./library.ocaml/fmt/fmt.cma"]=1 + x["./library.ocaml/fmt/fmt.cmi"]=1 + # x["./library.ocaml/fmt/fmt.cmt"]=1 + x["./library.ocaml/fmt/fmt.cmti"]=1 + x["./library.ocaml/fmt/fmt.cmx"]=1 + x["./library.ocaml/fmt/fmt.cmxa"]=1 + # x["./library.ocaml/fmt/fmt.cmxs"]=1 + # x["./library.ocaml/fmt/fmt.ml"]=1 + x["./library.ocaml/fmt/fmt.mli"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} + + +$2 == "library.ocaml" { link($0); next } + +$2 == "config" { link($0); next } +$2 == "keys" { link($0); next } +$2 == "zsh" { link($0); next } +$2 == "env" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } + +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "icons" { link($0); next } +$2 == "terminfo" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/ocaml-fmt b/variants/root-x86_64/ocaml-fmt @@ -0,0 +1,103 @@ +#!/usr/bin/env pthbs-build +#+busybox.05cde6bebcef146cc4de9201c82e0ef427702cc3bfe1acb48c0587542ba53002 +#+busybox-findutils.2c87d98d861d724e141128f395bed58e70601468aee2a192d77d5791d83772b7 +#+busybox-awk.a5b9d5a1c719361e565a642a57d44356c26855fb0eda30c03eaf582ba6c3194b +#+busybox-diffutils.977bc00da27e0150d3b3d395fe42cf24e0364b03390cab81002f27b34158d9fc +#+musl-cross-make.ef7f483eefcad5b8f2d6c8329e61a0acaca7864b88e9521cb839392c62f45676 +#+ocaml.4b14d5c50c08207a0442af369f9995a12f6a15db8d8b0fd5247a982789fc3090 +#+ocaml-findlib.904b5d142efa177bbf52240eab6c0c12939c379ef5aea4d3f2c39302d1a34522 +#+ocamlbuild.7dbc10e2fcb4197fa855b0d7ac0932a3c7920e53535a080407d725092501ef20 +#+opam.41ab4229b7606047164bfc9b9077da4555831edd67cf82d236ba1c6059bb9b96 +#+ocaml-topkg.5bf44aba09f15368614c9fadd8aed1698398a912cc215fca27bbe65284e64b47 +#@untar:-j:sha256:f1fb20805a22dd75a137d72704a370e7789cf6bdf63948e6817d1c226c141261:. + + +# - build script start - + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'fmt-0.9.0' + + + +ocaml -I "$OCAMLPATH" pkg/pkg.ml build + + + opam-installer -i \ + --prefix="$dest" \ + --libdir="$dest/library.ocaml" \ + --mandir="$dest/man" \ + --docdir="$dest/doc/ocaml-fmt" + + + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library.ocaml/fmt/fmt.a"]=1 + x["./library.ocaml/fmt/fmt.cma"]=1 + x["./library.ocaml/fmt/fmt.cmi"]=1 + # x["./library.ocaml/fmt/fmt.cmt"]=1 + x["./library.ocaml/fmt/fmt.cmti"]=1 + x["./library.ocaml/fmt/fmt.cmx"]=1 + x["./library.ocaml/fmt/fmt.cmxa"]=1 + # x["./library.ocaml/fmt/fmt.cmxs"]=1 + # x["./library.ocaml/fmt/fmt.ml"]=1 + x["./library.ocaml/fmt/fmt.mli"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} + + +$2 == "library.ocaml" { link($0); next } + +$2 == "config" { link($0); next } +$2 == "keys" { link($0); next } +$2 == "zsh" { link($0); next } +$2 == "env" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } + +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "icons" { link($0); next } +$2 == "terminfo" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links +