mrrl

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

ocaml-bos (3418B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.539513a18a06a21e4660004fea30f3658959c5c7f54488b66b5fee7120b0c27c
      3 #+busybox-findutils.3ba95afbbde5f39d6a3c0b17d82ff2e5350904cf19dd40acdf1c60ed126d3bda
      4 #+busybox-awk.4ac003d165540d0084cd08c1386f136343851ef344ac5ff844769b058049d859
      5 #+busybox-diffutils.b820ef7a40bea977a2bf740425ae15b2d9a21097bcf3a2f5ec77c21782b9deb8
      6 #+musl-cross-make.ef7f483eefcad5b8f2d6c8329e61a0acaca7864b88e9521cb839392c62f45676
      7 #+ocaml.4ba185dd68257d664e10ef27e557636e8abb7a415a49a8137175a33e7b7ccf7d
      8 #+ocaml-findlib.f61deca1ebde2fc9058ec2a4f49227ff7b440a538cc38c214512d7ac047770d6
      9 #+ocamlbuild.e608ac3d2b9cbd740bfc247ce47c6ec1219cbfe43e63443754729412c27d6a13
     10 #+opam.28e65f08040269b1af9630ac7fc9e2e0ee94b1072be464b563a58b3bdfe71b9d
     11 #+ocaml-topkg.1184b16caecfa8c95f12f6a99f564cc0d562dc6d4e118d14220f7927d1a51eaf
     12 #+ocaml-astring.3124c86e5645cf683380537a6d6faed8c661f5a37ff2b93e01753e38997dd145
     13 #+ocaml-fpath.b71d79a633f0aeffae84590564f1152c8528376d8d59400a8ac8eedb2c0bb10a
     14 #+ocaml-rresult.627aafc197ed47100c64f5141a02c47a13ac8523a2b1b966572295bd5eaa6985
     15 #+ocaml-fmt.57c383931b2db35e233515da9479f6919d7decbe49b790b7667a56a2aff82b23
     16 #+ocaml-logs.0dd07c505e737c16d1cc031e78d5bee2cf51f794887e6623dc0ffd7731b5001f
     17 #+ocaml-mtime.d01fffa03fc4ec4fd4f006055e091dd92217d27ce3b731a2f8fca50f90b57cbd
     18 #@untar:-j:sha256:d8d62e786b10d697e0457205a8eedeaa27ebcc90f1855f18df190cac2e3d8f37:.
     19 
     20 
     21 # - build script start -
     22 
     23 prefix=/versions/$pthbs_package
     24 dest=${pthbs_destdir%/}${prefix}
     25 cd 'bos-0.2.1'
     26 
     27 
     28 
     29 ocaml -I "$OCAMLPATH" pkg/pkg.ml build 
     30 
     31 
     32 	opam-installer -i \
     33 		--prefix="$dest" \
     34 		--libdir="$dest/library.ocaml" \
     35 		--mandir="$dest/man" \
     36 		--docdir="$dest/doc/ocaml-bos"
     37 
     38 
     39 
     40 
     41 
     42 cd "$pthbs_destdir/versions/$pthbs_package"
     43 find -type d -o -print | awk -F/ '
     44 BEGIN {
     45 
     46 	x["./library.ocaml/bos/META"]=1
     47 	x["./library.ocaml/bos/bos.a"]=1
     48 	x["./library.ocaml/bos/bos.cma"]=1
     49 	x["./library.ocaml/bos/bos.cmi"]=1
     50 	x["./library.ocaml/bos/bos.cmti"]=1
     51 	x["./library.ocaml/bos/bos.cmx"]=1
     52 	x["./library.ocaml/bos/bos.cmxa"]=1
     53 	x["./library.ocaml/bos/bos.mli"]=1
     54 }
     55 
     56 function r1(s) {
     57 	sub("^[.]/[^/]*", ".", s)
     58 	return s
     59 }
     60 function s1(repl, s) {
     61 	sub("^[.]/[^/]*", "./"repl, s)
     62 	return s
     63 }
     64 function link(src) {
     65 	x[$0]=0
     66 	printf "%s\t%s\n", $0, src
     67 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     68 }
     69 $1!="."{exit 1}
     70 
     71 
     72 $2 == "library.ocaml" { link($0); next }
     73 
     74 $2 == "config" { link($0); next }
     75 $2 == "keys" { link($0); next }
     76 $2 == "zsh" { link($0); next }
     77 $2 == "env" { link($0); next }
     78 $2 == "command" { link($0); next }
     79 $2 == "bin" { link(s1("command", $0)); next }
     80 
     81 $2 == "library.so" { link($0); next }
     82 $2 == "library" { link($0); next }
     83 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     84 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
     85 
     86 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     87 
     88 $2 == "man" { link($0); next }
     89 $2 == "info" { link($0); next }
     90 $2 == "doc" { link($0); next }
     91 $2 == "icons" { link($0); next }
     92 $2 == "terminfo" { link($0); next }
     93 $2 == "data" { link($0); next }
     94 $2 == "include" { link($0); next }
     95 
     96 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     97 
     98 END {
     99 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
    100 	for(fname in x) {
    101 		if(x[fname]) {
    102 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
    103 			exit 3
    104 		}
    105 	}
    106 }' >.install-links.new
    107 mv .install-links.new .install-links
    108