mrrl

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

s6-portable-utils (2400B)


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