mrrl

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

ocaml-bos (3436B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.d2d7aa00eac6ec561a10d126b1866f22e226a1276307466251e80fd8a4a1ebc7
      3 #+busybox-findutils.85b2328981df683d1ae7597eebdf3a332aa4241b936c0030fe3618cec1f4841a
      4 #+busybox-awk.4c3f8cc249ba35f1206fcaf2979bcfd66d09b117eeea4e6a939024825a542496
      5 #+busybox-diffutils.24775f761d337796ffe81623350e4bf2f039067f593411146bfeb9c80567d182
      6 #+musl-cross-make.e4735d8572f9b6654a7381ebdfbd62e665d1d1da5e06a56923e89274cc6a510f
      7 #+ocaml.a604427fdad1fc3adfb39b93cce894b4d525cb8c8d9933a4a7e69f2fa9b3a605
      8 #+ocaml-findlib.c68b7438793535371df386dab2caaf846b4b957a713708502a254b13d76eff50
      9 #+ocamlbuild.a64c7b5658b13dffe7daa77a1b350b6e73de7877c85fe3474b72c950fee31967
     10 #+opam.a170171d3fb8bdb854e2f99fe8e1ecc9f39f41974af390922802f5f1ca634248
     11 #+ocaml-topkg.f6a12d5db3db88a03151b9ff0c86e2f29683d6a2c7dc6db0960bdf0506df6776
     12 #+ocaml-astring.9c8abc346285a297d48876c1dba335efe21c597760d97d592920c1fd89a77193
     13 #+ocaml-fpath.6d64a952bb7a451637d6e3b7e7b9c800a8666cd93f9e56dcbde52f7f8d441522
     14 #+ocaml-rresult.98b46ba4be31e391fa91645dc2b72925f3afb8cdca49bf35a97e339fa9d48193
     15 #+ocaml-fmt.ee6b31ff9b9156404534874f2abd85005c458ae76b3d9c99dea4aa7719cf7ca2
     16 #+ocaml-logs.063aeb10f4944bb6ed9cc9c621bb727293a895c3803516b9456a9e9eec6742b7
     17 #+ocaml-mtime.05c62e978188719098c6b2b580b9432c7512189b347ab4d6181449b8773f2e68
     18 #@untar:-j:sha256:d8d62e786b10d697e0457205a8eedeaa27ebcc90f1855f18df190cac2e3d8f37:.
     19 
     20 
     21 # - build script start -
     22 
     23 prefix=/home/ccx/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/home/ccx/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