logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

pass1.kaem (1298B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
  3. # SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
  4. # SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
  5. #
  6. # SPDX-License-Identifier: GPL-3.0-or-later
  7. set -ex
  8. # Check tarball checksums
  9. checksum-transcriber sources
  10. sha256sum -c sources.SHA256SUM
  11. mkdir build src
  12. cd build
  13. # Extract
  14. cp ${DISTFILES}/${pkg}.tar.bz2 ../src/
  15. bzip2 -d -f ../src/${pkg}.tar.bz2
  16. tar xf ../src/${pkg}.tar
  17. rm -r ../src/
  18. cd ${pkg}
  19. cp ../../mk/main.mk Makefile
  20. cp ../../mk/builtins.mk builtins/Makefile
  21. cp ../../mk/common.mk common.mk
  22. # Create various .h files
  23. touch config.h
  24. touch include/version.h
  25. touch include/pipesize.h
  26. rm y.tab.c y.tab.h
  27. # Patch
  28. patch -Np1 -i ../../patches/mes-libc.patch
  29. patch -Np1 -i ../../patches/tinycc.patch
  30. patch -Np1 -i ../../patches/missing-defines.patch
  31. patch -Np1 -i ../../patches/locale.patch
  32. patch -Np1 -i ../../patches/dev-tty.patch
  33. # Compile
  34. make mkbuiltins
  35. cd builtins
  36. make libbuiltins.a
  37. cd ..
  38. make
  39. # Install
  40. install bash ${PREFIX}/bin/
  41. install bash ${PREFIX}/bin/sh
  42. cd ../..
  43. # Checksums
  44. if match x${UPDATE_CHECKSUMS} xTrue; then
  45. sha256sum -o ${pkg}.checksums \
  46. /usr/bin/bash
  47. install ${pkg}.checksums ${SRCDIR}
  48. else
  49. sha256sum -c ${pkg}.checksums
  50. fi