mrrl

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

s6-linux-init (2538B)


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