mrrl

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

openssl (2164B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.f4ef3d511c029095beda8d21dd48f7730bec63fb09792ca951402d6620338089
      3 #+gnu-make.444e811a68f4f16724e21354b710fad3592e53a2dbf7c0c78658f3d4e7c8e465
      4 #+musl-cross-make.d0431fc0def788be03da43136972361827de52c8e6f0a6f3890dc57fe32e8ecc
      5 #@untar:-z:sha256:712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539:.
      6 
      7 build_env_static() {
      8 	export LD_LIBRARY_PATH="$pthbs_build_environment/library"
      9 	export CPATH="$pthbs_build_environment/include"
     10 	export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS"
     11 }
     12 build_env_static
     13 cd openssl-3.3.3
     14 ./config  # this will fail, perl is not packaged
     15 make -j${JOBS:-1} -l$((1+${JOBS:-1})) install
     16 check_static command/openssl
     17 check_static command/ocspcheck
     18 
     19 
     20 cd "$pthbs_destdir/versions/$pthbs_package"
     21 find -type d -o -print | awk -F/ '
     22 BEGIN {
     23 	x["./command/openssl"]=1
     24 	x["./command/ocspcheck"]=1
     25 	x["./man/man1/openssl.1"]=1
     26 	x["./library/libssl.a"]=1
     27 	x["./include/tls.h"]=1
     28 }
     29 
     30 function r1(s) {
     31 	sub("^[.]/[^/]*", ".", s)
     32 	return s
     33 }
     34 function s1(repl, s) {
     35 	sub("^[.]/[^/]*", "./"repl, s)
     36 	return s
     37 }
     38 function link(src) {
     39 	x[$0]=0
     40 	printf "%s\t%s\n", $0, src
     41 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     42 }
     43 $1!="."{exit 1}
     44 
     45 
     46 $2 == "command" { link($0); next }
     47 $2 == "bin" { link(s1("command", $0)); next }
     48 
     49 $2 == "library.so" { link($0); next }
     50 $2 == "library" { link($0); next }
     51 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     52 $2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next }
     53 
     54 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     55 
     56 $2 == "man" { link($0); next }
     57 $2 == "info" { link($0); next }
     58 $2 == "doc" { link($0); next }
     59 $2 == "icons" { link($0); next }
     60 $2 == "terminfo" { link($0); next }
     61 $2 == "data" { link($0); next }
     62 $2 == "include" { link($0); next }
     63 
     64 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     65 
     66 END {
     67 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
     68 	for(fname in x) {
     69 		if(x[fname]) {
     70 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
     71 			exit 3
     72 		}
     73 	}
     74 }' >.install-links.new
     75 mv .install-links.new .install-links