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