error-standalone (2597B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.d2d7aa00eac6ec561a10d126b1866f22e226a1276307466251e80fd8a4a1ebc7 3 #+busybox-findutils.85b2328981df683d1ae7597eebdf3a332aa4241b936c0030fe3618cec1f4841a 4 #+busybox-awk.4c3f8cc249ba35f1206fcaf2979bcfd66d09b117eeea4e6a939024825a542496 5 #+musl-cross-make.e4735d8572f9b6654a7381ebdfbd62e665d1d1da5e06a56923e89274cc6a510f 6 #+gnu-make.75a726f6c19f7bc10b95a84da3ce72fb785ebdf587504430c6b74cfb6610b728 7 #+busybox-diffutils.24775f761d337796ffe81623350e4bf2f039067f593411146bfeb9c80567d182 8 #@untar:-z:sha256:0e751989cea94e25d5166a6a1ed9bde218786e39dff82e1f01dff12fc78639d9:. 9 10 11 # - build script start - 12 13 build_env_static() { 14 export LD_LIBRARY_PATH="$pthbs_build_environment/library" 15 export CPATH="$pthbs_build_environment/include" 16 export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" 17 } 18 19 prefix=/home/ccx/versions/$pthbs_package 20 dest=${pthbs_destdir%/}${prefix} 21 cd 'error-standalone-2.0' 22 23 24 make -j${JOBS:-1} -l$((1+${JOBS:-1})) PREFIX=/home/ccx/versions/$pthbs_package \ 25 DESTDIR="$pthbs_destdir" \ 26 INCDIR="$prefix/include" \ 27 LIBDIR="$prefix/library" \ 28 install-static 29 30 31 32 33 34 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" 35 find -type d -o -print | awk -F/ ' 36 BEGIN { 37 x["./library/liberror.a"]=1 38 x["./include/error.h"]=1 39 } 40 41 function r1(s) { 42 sub("^[.]/[^/]*", ".", s) 43 return s 44 } 45 function s1(repl, s) { 46 sub("^[.]/[^/]*", "./"repl, s) 47 return s 48 } 49 function link(src) { 50 x[$0]=0 51 printf "%s\t%s\n", $0, src 52 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 53 } 54 $1!="."{exit 1} 55 56 57 $2 == "config" { link($0); next } 58 $2 == "keys" { link($0); next } 59 $2 == "zsh" { link($0); next } 60 $2 == "env" { link($0); next } 61 $2 == "command" { link($0); next } 62 $2 == "bin" { link(s1("command", $0)); next } 63 64 $2 == "library.so" { link($0); next } 65 $2 == "library" { link($0); next } 66 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } 67 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } 68 69 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } 70 71 $2 == "man" { link($0); next } 72 $2 == "info" { link($0); next } 73 $2 == "doc" { link($0); next } 74 $2 == "icons" { link($0); next } 75 $2 == "terminfo" { link($0); next } 76 $2 == "data" { link($0); next } 77 $2 == "include" { link($0); next } 78 79 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } 80 81 END { 82 for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } 83 for(fname in x) { 84 if(x[fname]) { 85 printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" 86 exit 3 87 } 88 } 89 }' >.install-links.new 90 mv .install-links.new .install-links 91