mrrl

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

busybox (1383B)


      1 #!/usr/bin/env pthbs-build
      2 #+musl-cross-make.757bcca6771cad3395ae302e0fdc835ebf5b4a965c08e30d758e6149b0bacbcd
      3 #+gnu-make.e7ff1e81614b0d3c152cd2b39eb961289d08617e45a0a749932d053bba398337
      4 #+busybox.8e33d8022cc1ea565c75884e2ede0ec1cc7a7fa0b741a3e0c909c4963a4af081
      5 #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox
      6 #@sha256:955edd28faae9dd665f002c85466eef58ef8fd36d76d1f39eb974e22933478ab:busybox/.config
      7 
      8 : ${JOBS:=1}
      9 
     10 export CC="$pthbs_build_environment/command/x86_64-linux-musl-gcc"
     11 export CFLAGS="-D_GNU_SOURCE"
     12 export LDFLAGS="-static"
     13 
     14 cd busybox
     15 make V=1 CROSS_COMPILE=x86_64-linux-musl- LDFLAGS=-static HOSTLDFLAGS=-static \
     16       HOSTCC="$CC -static" CC="$CC -static" HOSTCFLAGS=-D_GNU_SOURCE -j$JOBS
     17 
     18 mkdir -p "$pthbs_destdir/versions/$pthbs_package/command"
     19 cp -a busybox "$pthbs_destdir/versions/$pthbs_package/command/"
     20 cd "$pthbs_destdir/versions/$pthbs_package"
     21 echo false | ./command/busybox --list >/dev/null # test if it works
     22 ./command/busybox --list | awk '
     23 /^(cmp|diff)$/ {next}  # provided by diffutils
     24 /^(login)$/ {next}  # provided by logincaps
     25 /^(reset|clear)$/ {next}  # provided by netbsd-curses
     26 /^(chvt|deallocvt|fgconsole|kbd_mode|openvt|setfont|setkeycodes|showkey)$/ {next}  # provided by kbd
     27 { print "./command/busybox\t./command/" $0 }
     28 END { print "./command/busybox\t./command/busybox" }
     29 ' >.install-links.new
     30 mv .install-links.new .install-links