mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

s6-networking (2804B)


      1 #!/usr/bin/env pthbs-build
      2 #+musl-cross-make.675bc960d97b88b341ba4c64ea1b10f6afd9c9f0394ed84ca848768c5e1b646c
      3 #+gnu-make.152d99fd58e3130b4bd4d23833643ca418555a0560e88962cd8a28ffcd9a9ab7
      4 #+busybox.7818e9d6df97d97317c8fcdf404811731aa0c5c3ab7eb6aec00c9652b6da511c
      5 #+skalibs.bea01bef48eb94cd6525a785479cbbbe7a203cd941e277a5e3b8d494d8dbf1cd
      6 #+execline.d4fee837def832332b7e642764c80bef670c35b5e473f1590c4b56f88e2ae571
      7 #+s6.716acd4be9854d2eb4b213e4852567fbd963fb905a246d0a0e30251e2153720e
      8 #+s6-dns.719d3eab2620bf72297a431584a0d81222d21c289068fed89184437a5495b9e6
      9 #+libressl.c6f4193f35d146e0af36bfb69d8f4a9be69da9ea0b9cb80b05ddd617ea12cece
     10 #@git:3f4b601c6503e26de21c2495053df638e1c2b0c6:s6-networking
     11 
     12 : ${JOBS:=1}
     13 prefix=/versions/$pthbs_package
     14 cd 's6-networking'
     15 ./configure --enable-ssl=libtls \
     16 	--prefix="$prefix" \
     17 	--dynlibdir="${prefix}/library.so" \
     18 	--bindir="${prefix}/command" \
     19 	--libdir="${prefix}/library" \
     20 	--shebangdir="${prefix}/command" \
     21 	--with-sysdeps='/versions/skalibs.bea01bef48eb94cd6525a785479cbbbe7a203cd941e277a5e3b8d494d8dbf1cd/sysdeps' \
     22 	--with-include="$pthbs_build_environment/include" \
     23 	--with-lib="$pthbs_build_environment/library" \
     24 	--with-dynlib="$pthbs_build_environment/library.so" \
     25 	--disable-shared --enable-static --enable-allstatic --enable-static-libc --absolute-paths
     26 
     27 make -j${JOBS:-1} -l$((1+${JOBS:-1}))
     28 make DESTDIR="$pthbs_destdir" install
     29 
     30 cd "$pthbs_destdir/versions/$pthbs_package"
     31 find -type d -o -print | awk -F/ '
     32 BEGIN {
     33 	x["./command/s6-tcpclient"]=1
     34 	x["./command/s6-tcpserver"]=1
     35 	x["./command/s6-tlsclient"]=1
     36 	x["./command/s6-tlsserver"]=1
     37 }
     38 
     39 function r1(s) {
     40 	sub("^[.]/[^/]*", ".", s)
     41 	return s
     42 }
     43 function s1(repl, s) {
     44 	sub("^[.]/[^/]*", "./"repl, s)
     45 	return s
     46 }
     47 function link(src) {
     48 	x[$0]=0
     49 	printf "%s\t%s\n", $0, src
     50 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     51 }
     52 $1!="."{exit 1}
     53 
     54 
     55 $2 == "command" { link($0); next }
     56 $2 == "bin" { link(s1("command", $0)); next }
     57 
     58 $2 == "library.so" { link($0); next }
     59 $2 == "library" { link($0); next }
     60 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     61 $2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next }
     62 
     63 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     64 
     65 $2 == "man" { link($0); next }
     66 $2 == "info" { link($0); next }
     67 $2 == "doc" { link($0); next }
     68 $2 == "icons" { link($0); next }
     69 $2 == "terminfo" { link($0); next }
     70 $2 == "data" { link($0); next }
     71 $2 == "include" { link($0); next }
     72 
     73 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     74 
     75 END {
     76 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
     77 	for(fname in x) {
     78 		if(x[fname]) {
     79 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
     80 			exit 3
     81 		}
     82 	}
     83 }' >.install-links.new
     84 mv .install-links.new .install-links