mrrl

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

ocaml-ppxlib (3264B)


      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 #+dune.0bf65718bc1e5a3abfdf3b4104edc05e8902dfe2c665bbe2f24375f031b692c9
      9 #+ocaml-compiler-libs.434919ff1ef8de3a7f8464c4a494444ecd97045ee318e250c19d120692b78d2b
     10 #+ocaml-ppx_derivers.1ee8db3abc6fc710897b6b1defa64c11eef4424a0ce08e70569b678fe9fed518
     11 #+ocaml-sexplib0.17ce77225026456744e92b733043f01b0ded64c2c054a6b9ae0f0bb36e99430b
     12 #+ocaml-stdlib-shims.e355d8329a7a47fb9fb64deafcd1633624963262d7c385e87b1b9d8036ac00a4
     13 #@untar:-j:sha256:2e223837e7cecc3bc84a432432c0a72f4e1d5be9165c9c33772f156db85db0b3:.
     14 
     15 
     16 # - build script start -
     17 
     18 prefix=/versions/$pthbs_package
     19 dest=${pthbs_destdir%/}${prefix}
     20 cd 'ppxlib-0.37.0'
     21 
     22 
     23 export DUNE_CACHE=disabled
     24 
     25 
     26 
     27 dune build --no-buffer --verbose -p ppxlib -j "${JOBS:-1}"
     28 
     29 
     30 dune install \
     31 	--destdir="$pthbs_destdir" \
     32 	--prefix="$prefix" \
     33 	--libdir="$prefix/library.ocaml" \
     34 	--bindir="$prefix/command" \
     35 	--sbindir="$prefix/command" \
     36 	--etcdir="$prefix/config/etc" \
     37 	--mandir="$prefix/man" \
     38 	--docdir="$prefix/doc/ocaml-ppxlib" \
     39 	--datadir="$prefix/data" \
     40 	-p ppxlib
     41 
     42 
     43 
     44 
     45 
     46 cd "$pthbs_destdir/versions/$pthbs_package"
     47 find -type d -o -print | awk -F/ '
     48 BEGIN {
     49 	x["./library.ocaml/ppxlib/META"]=1
     50 	x["./library.ocaml/ppxlib/ppxlib.a"]=1
     51 	x["./library.ocaml/ppxlib/ppxlib.cma"]=1
     52 	x["./library.ocaml/ppxlib/ppxlib.cmi"]=1
     53 	x["./library.ocaml/ppxlib/ppxlib.cmx"]=1
     54 	x["./library.ocaml/ppxlib/ppxlib.cmxa"]=1
     55 	x["./library.ocaml/ppxlib/ppxlib.ml"]=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