mrrl

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

git (3441B)


      1 #!/usr/bin/env pthbs-build
      2 #+busybox.d2d7aa00eac6ec561a10d126b1866f22e226a1276307466251e80fd8a4a1ebc7
      3 #+busybox-findutils.85b2328981df683d1ae7597eebdf3a332aa4241b936c0030fe3618cec1f4841a
      4 #+busybox-awk.4c3f8cc249ba35f1206fcaf2979bcfd66d09b117eeea4e6a939024825a542496
      5 #+musl-cross-make.e4735d8572f9b6654a7381ebdfbd62e665d1d1da5e06a56923e89274cc6a510f
      6 #+gnu-make.75a726f6c19f7bc10b95a84da3ce72fb785ebdf587504430c6b74cfb6610b728
      7 #+busybox-diffutils.24775f761d337796ffe81623350e4bf2f039067f593411146bfeb9c80567d182
      8 #+m4.478aa95758da2858007dad2c971921d7d91e7166d000285a1b91bc684a6f17a9
      9 #+libressl.de7444026279c2cb27262bce64bc243cdfaab374282b63ad354f78cb0f04b311
     10 #+curl.18b54d5ada31bc7c0adfa1d6d2927f501e566b3a07c234f35926719ec2262ceb
     11 #@untar:-J:sha256:f612c1abc63557d50ad3849863fc9109670139fc9901e574460ec76e0511adb9:.
     12 
     13 
     14 # - build script start -
     15 
     16 check_static() {
     17 	local exe || true
     18 	exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1
     19 	if ! test -f $exe; then
     20 		printf '%s\n' "Error: file '$1' doesn't exist!"
     21 		exit 1
     22 	fi
     23 	local interp_info || true
     24 	interp_info=$(readelf --string-dump=.interp "$exe") || exit $?
     25 	if test x '!=' "x$interp_info"; then
     26 		printf '%s\n' "Error: '$1' is a dynamic binary!"
     27 		exit 1
     28 	fi
     29 }
     30 
     31 prefix=/home/ccx/versions/$pthbs_package
     32 dest=${pthbs_destdir%/}${prefix}
     33 cd 'git-2.43.2'
     34 
     35 
     36 make -j${JOBS:-1} -l$((1+${JOBS:-1})) \
     37 	LD_LIBRARY_PATH="$pthbs_build_environment/library:$pthbs_build_environment/library.so" \
     38 	CPATH="$pthbs_build_environment/include" \
     39 	LDFLAGS="-static --static -L$pthbs_build_environment/library" \
     40 	CPPFLAGS="-D_GNU_SOURCE" \
     41 	NO_REGEX=NeedsStartEnd \
     42 	NO_TCLTK=1 NO_PYTHON=1 NO_EXPAT=1 NO_GETTEXT=1 \
     43 	DESTDIR="$pthbs_destdir" \
     44 	prefix="$prefix" \
     45 	gitexecdir="$prefix"/git-core \
     46 	bindir="$prefix/command" \
     47 	mandir="$prefix/man" \
     48 	infodir="$prefix/info" \
     49 	sharedir="$prefix/share" \
     50 	gitwebdir="$prefix/gitweb" \
     51 	V=1 all install
     52 
     53 
     54 check_static command/git
     55 
     56 
     57 
     58 cd "$pthbs_destdir/home/ccx/versions/$pthbs_package"
     59 find -type d -o -print | awk -F/ '
     60 BEGIN {
     61 	x["./command/git"]=1
     62 	x["./command/git-upload-archive"]=1
     63 	x["./command/git-receive-pack"]=1
     64 }
     65 
     66 function r1(s) {
     67 	sub("^[.]/[^/]*", ".", s)
     68 	return s
     69 }
     70 function s1(repl, s) {
     71 	sub("^[.]/[^/]*", "./"repl, s)
     72 	return s
     73 }
     74 function link(src) {
     75 	x[$0]=0
     76 	printf "%s\t%s\n", $0, src
     77 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     78 }
     79 $1!="."{exit 1}
     80 
     81 
     82 $2 == "config" { link($0); next }
     83 $2 == "keys" { link($0); next }
     84 $2 == "zsh" { link($0); next }
     85 $2 == "env" { link($0); next }
     86 $2 == "command" { link($0); next }
     87 $2 == "bin" { link(s1("command", $0)); next }
     88 
     89 $2 == "library.so" { link($0); next }
     90 $2 == "library" { link($0); next }
     91 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     92 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
     93 
     94 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     95 
     96 $2 == "man" { link($0); next }
     97 $2 == "info" { link($0); next }
     98 $2 == "doc" { link($0); next }
     99 $2 == "icons" { link($0); next }
    100 $2 == "terminfo" { link($0); next }
    101 $2 == "data" { link($0); next }
    102 $2 == "include" { link($0); next }
    103 
    104 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
    105 
    106 END {
    107 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
    108 	for(fname in x) {
    109 		if(x[fname]) {
    110 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
    111 			exit 3
    112 		}
    113 	}
    114 }' >.install-links.new
    115 mv .install-links.new .install-links
    116