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