mrrl

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

execline:bootstrap (3158B)


      1 #!/usr/bin/env pthbs-build
      2 #@pragma:nosandbox
      3 #+musl-cross-make.9be7a57aa0035ff26870115e69056e25445f3a96768a7d81251e7073630aadf9
      4 #+gnu-make.05bfcd168c0d3714ecba9e27d84e02bfd2ef8f754c26c162be357882390451fc
      5 #+busybox.23105cf3c52263661c44f7d855ae5dfc7287f5f8b60d6a026dedee24f4cf7a2e
      6 #+nawk.abe3790fd5e321ccd4e1ab7dab56339222e2eee686bc4b2241e7853104a4a500
      7 #+skalibs.e0039352bf67eec5491806301102ee2164a3cf89f62e795221ba7c44e441beae
      8 #@git:ecdd92c89a1edc46044b51816eeef160f195466b:execline
      9 
     10 
     11 # - build script start -
     12 
     13 prefix=/home/ccx/versions/$pthbs_package
     14 dest=${pthbs_destdir%/}${prefix}
     15 cd 'execline'
     16 
     17 export CC="$pthbs_build_environment/command/x86_64-linux-musl-gcc"
     18 export CXX="$pthbs_build_environment/command/x86_64-linux-musl-g++"
     19 export LD="$pthbs_build_environment/command/x86_64-linux-musl-ld"
     20 export AR="$pthbs_build_environment/command/x86_64-linux-musl-ar"
     21 export CFLAGS="-O2 -ggdb"
     22 
     23 ./configure \
     24 	--prefix="$prefix" \
     25 	--sysdepdir="${prefix}/sysdeps" \
     26 	--binprefix="${prefix}/command" \
     27 	--extbinprefix="${prefix}/command" \
     28 	--dynlibdir="${prefix}/library.so" \
     29 	--libdir="${prefix}/library" \
     30 	--includedir="${prefix}/include" \
     31 	--with-sysdeps='/home/ccx/versions/skalibs.e0039352bf67eec5491806301102ee2164a3cf89f62e795221ba7c44e441beae/sysdeps' \
     32 	--with-include="$pthbs_build_environment/include" \
     33 	--with-lib="$pthbs_build_environment/library" \
     34 	--with-dynlib="$pthbs_build_environment/library.so" \
     35 	--disable-shared --enable-static --enable-allstatic --enable-static-libc --absolute-paths
     36 
     37 make -j${JOBS:-1} -l$((1+${JOBS:-1}))
     38 
     39 make DESTDIR="$pthbs_destdir" install
     40 
     41 
     42 
     43 
     44 
     45 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package"
     46 find -type d -o -print | awk -F/ '
     47 BEGIN {}
     48 
     49 function r1(s) {
     50 	sub("^[.]/[^/]*", ".", s)
     51 	return s
     52 }
     53 function s1(repl, s) {
     54 	sub("^[.]/[^/]*", "./"repl, s)
     55 	return s
     56 }
     57 function link(src) {
     58 	x[$0]=0
     59 	printf "%s\t%s\n", $0, src
     60 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     61 }
     62 $1!="."{exit 1}
     63 $2 == "env" { link($0); next }
     64 $2 == ".env-template" { link($0); next }
     65 
     66 $2 == "command" { link($0); next }
     67 $2 == "command" { link($0); next }
     68 $2 == "bin" { link(s1("command", $0)); next }
     69 $2 == "sbin" { link(s1("command", $0)); next }
     70 
     71 $2 == "library.so" { link($0); next }
     72 $2 == "library" { link($0); next }
     73 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     74 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
     75 
     76 $2 == "share" && $3 == "info" { link(s1("info", r1($0))); next }
     77 $2 == "share" && $3 == "man" { link(s1("man", r1($0))); next }
     78 $2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next }
     79 
     80 $2 == "config" { link($0); next }
     81 $2 == "man" { link($0); next }
     82 $2 == "info" { link($0); next }
     83 $2 == "doc" { link($0); next }
     84 $2 == "data" { link($0); next }
     85 $2 == "include" { link($0); next }
     86 
     87 
     88 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     89 
     90 END {
     91 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
     92 	retcode = 0
     93 	for(fname in x) {
     94 		if(x[fname]) {
     95 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
     96 			retcode = 3
     97 		}
     98 	}
     99 	exit retcode
    100 }' >.install-links.new
    101 mv .install-links.new .install-links
    102