mrrl

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

s6 (2544B)


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