mrrl

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

skalibs:bootstrap (2540B)


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