mrrl

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

ocaml-ppx_deriving (3516B)


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