s6-networking (3152B)
1 #!/usr/bin/env pthbs-build 2 #+busybox.539513a18a06a21e4660004fea30f3658959c5c7f54488b66b5fee7120b0c27c 3 #+busybox-findutils.3ba95afbbde5f39d6a3c0b17d82ff2e5350904cf19dd40acdf1c60ed126d3bda 4 #+busybox-awk.4ac003d165540d0084cd08c1386f136343851ef344ac5ff844769b058049d859 5 #+musl-cross-make.ef7f483eefcad5b8f2d6c8329e61a0acaca7864b88e9521cb839392c62f45676 6 #+gnu-make.6c204d453a2d9b4e29dd7b9f93fc7c5a928284402b8646493cf72004f748753c 7 #+skalibs.77d865e67c6203716dde57ee5c1b6bdb476b4c00c5e4a459deb7b402c19a5532 8 #+execline.bbdee27ba351e082ed15132d873419815cb0bc19523a36af84571eab05c0e836 9 #+s6.f8253c2abb58178ecb00dce8c7ddf1f2a9442f92cc684a89bac43678e8b032ef 10 #+s6-dns.4ddc4601e7a19fdd27aa68ea82381c49dc638289f342129fa066d99889ceb886 11 #+libressl.e97bfa759fd72f50d85a4acf6095ffc27a96a40b443e951c1024d7f5afe898e9 12 #@git:12b40106ed1727274cd6af379c4ba0ca7161700b:s6-networking 13 14 15 # - build script start - 16 17 prefix=/versions/$pthbs_package 18 dest=${pthbs_destdir%/}${prefix} 19 cd 's6-networking' 20 21 22 ./configure --enable-ssl=libtls \ 23 --prefix="$prefix" \ 24 --dynlibdir="${prefix}/library.so" \ 25 --bindir="${prefix}/command" \ 26 --libdir="${prefix}/library" \ 27 --shebangdir="${prefix}/command" \ 28 --with-sysdeps='/versions/skalibs.77d865e67c6203716dde57ee5c1b6bdb476b4c00c5e4a459deb7b402c19a5532/sysdeps' \ 29 --with-include="$pthbs_build_environment/include" \ 30 --with-lib="$pthbs_build_environment/library" \ 31 --with-dynlib="$pthbs_build_environment/library.so" \ 32 --disable-shared --enable-static --enable-allstatic --enable-static-libc --absolute-paths 33 34 35 make -j${JOBS:-1} -l$((1+${JOBS:-1})) 36 37 make DESTDIR="$pthbs_destdir" install 38 39 40 41 42 43 cd "$pthbs_destdir/versions/$pthbs_package" 44 find -type d -o -print | awk -F/ ' 45 BEGIN { 46 x["./command/s6-tcpclient"]=1 47 x["./command/s6-tcpserver"]=1 48 x["./command/s6-tlsclient"]=1 49 x["./command/s6-tlsserver"]=1 50 } 51 52 function r1(s) { 53 sub("^[.]/[^/]*", ".", s) 54 return s 55 } 56 function s1(repl, s) { 57 sub("^[.]/[^/]*", "./"repl, s) 58 return s 59 } 60 function link(src) { 61 x[$0]=0 62 printf "%s\t%s\n", $0, src 63 printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" 64 } 65 $1!="."{exit 1} 66 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