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