mrrl

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

ocaml-ppx_deriving (3534B)


      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-compiler-libs.ff1c609c587ed54fac593f897784327fdc0cafd5adb9ace2d07c6437d81ed0dc
     10 #+ocaml-cppo.b6f09b617232b0eb982b9669a8fa403e0a3770b872cfd3c2af7a8859e6befe8f
     11 #+ocaml-findlib.c68b7438793535371df386dab2caaf846b4b957a713708502a254b13d76eff50
     12 #+ocaml-ppx_derivers.4a139aa4f40cd91747b3c9230ca26a796bac355eff33452d471765fb1c35bad3
     13 #+ocaml-ppxlib.c5f27f5844d12faecf96e9dbda856f1e5ea741bc7a49cf419f0fa45e3c7bf9b3
     14 #+ocaml-sexplib0.3722674a579364a0dd42b3efb0ccdbbd30b046cb2f7ecf19aa8ed8f33d83c7df
     15 #+ocaml-stdlib-shims.306fa9f71f778af2e6c546d08db41369714ddad28df75058109c089c156f2dcb
     16 #@untar:-z:sha256:c91d1ea5e15e6928a2f8947dbd135b9f765cc0e2d72be271427981afcd350c24:.
     17 
     18 
     19 # - build script start -
     20 
     21 prefix=/home/ccx/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/home/ccx/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