mrrl

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

ocaml-base (3027B)


      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 #+dune.01ed63774a01622c91b0c4d36562a7b8fb994ce0a75b1ada7f65fd9d3f5ae531
      9 #+ocaml_intrinsics_kernel.bd2c73b10f46babd325ef861ed94d8f70787d251d271a9844d06b8a9b8607229
     10 #+ocaml-sexplib0.3722674a579364a0dd42b3efb0ccdbbd30b046cb2f7ecf19aa8ed8f33d83c7df
     11 #@untar:-z:sha256:3f3f64789ab25bb5cb7f5f907dd651dec9cc9440981822fe75df6b94344b7208:.
     12 
     13 
     14 # - build script start -
     15 
     16 
     17 prefix=/home/ccx/versions/$pthbs_package
     18 dest=${pthbs_destdir%/}${prefix}
     19 cd 'base-0.17.3'
     20 
     21 sed -i 's/(bash /(run sh -c /' src/dune
     22 
     23 
     24 export DUNE_CACHE=disabled
     25 
     26 
     27 
     28 dune build --no-buffer --verbose --release -j "${JOBS:-1}"
     29 
     30 
     31 dune install \
     32 	--destdir="$pthbs_destdir" \
     33 	--prefix="$prefix" \
     34 	--libdir="$prefix/library.ocaml" \
     35 	--bindir="$prefix/command" \
     36 	--sbindir="$prefix/command" \
     37 	--etcdir="$prefix/config/etc" \
     38 	--mandir="$prefix/man" \
     39 	--docdir="$prefix/doc/ocaml-base" \
     40 	--datadir="$prefix/data" \
     41 	
     42 
     43 
     44 
     45 dune runtest --build-dir=.testenv --no-buffer --verbose
     46 
     47 
     48 
     49 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package"
     50 find -type d -o -print | awk -F/ '
     51 BEGIN {
     52 	x["./library.ocaml/base/base.ml"]=1
     53 	x["./library.ocaml/base/base.cma"]=1
     54 	x["./library.ocaml/base/base.cmi"]=1
     55 }
     56 
     57 function r1(s) {
     58 	sub("^[.]/[^/]*", ".", s)
     59 	return s
     60 }
     61 function s1(repl, s) {
     62 	sub("^[.]/[^/]*", "./"repl, s)
     63 	return s
     64 }
     65 function link(src) {
     66 	x[$0]=0
     67 	printf "%s\t%s\n", $0, src
     68 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     69 }
     70 $1!="."{exit 1}
     71 
     72 
     73 $2 == "library.ocaml" { link($0); next }
     74 
     75 $2 == "config" { link($0); next }
     76 $2 == "keys" { link($0); next }
     77 $2 == "zsh" { link($0); next }
     78 $2 == "env" { link($0); next }
     79 $2 == "command" { link($0); next }
     80 $2 == "bin" { link(s1("command", $0)); next }
     81 
     82 $2 == "library.so" { link($0); next }
     83 $2 == "library" { link($0); next }
     84 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     85 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
     86 
     87 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     88 
     89 $2 == "man" { link($0); next }
     90 $2 == "info" { link($0); next }
     91 $2 == "doc" { link($0); next }
     92 $2 == "icons" { link($0); next }
     93 $2 == "terminfo" { link($0); next }
     94 $2 == "data" { link($0); next }
     95 $2 == "include" { link($0); next }
     96 
     97 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     98 
     99 END {
    100 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
    101 	for(fname in x) {
    102 		if(x[fname]) {
    103 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
    104 			exit 3
    105 		}
    106 	}
    107 }' >.install-links.new
    108 mv .install-links.new .install-links
    109