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