mrrl

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

ocaml-cppo (3098B)


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