logo

live-bootstrap

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

pass1.kaem (983B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
  3. # SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
  4. #
  5. # SPDX-License-Identifier: GPL-3.0-or-later
  6. set -ex
  7. # Check tarball checksums
  8. checksum-transcriber sources
  9. sha256sum -c sources.SHA256SUM
  10. mkdir build src
  11. cd build
  12. # Extract
  13. cp ${DISTFILES}/${pkg}.tar.xz ../src/
  14. unxz --file ../src/${pkg}.tar.xz --output ../src/${pkg}.tar
  15. tar xf ../src/${pkg}.tar
  16. rm -r ../src
  17. cd ${pkg}
  18. # Patch
  19. patch -Np1 -i ../../patches/mes-libc.patch
  20. patch -Np1 -i ../../patches/coreutils.patch
  21. # Build
  22. make CC=tcc AR="tcc -ar" LDFLAGS="-static" bzip2
  23. # Install
  24. cp bzip2 ${PREFIX}/bin/bzip2
  25. cp bzip2 ${PREFIX}/bin/bunzip2
  26. chmod 755 ${PREFIX}/bin/bzip2
  27. chmod 755 ${PREFIX}/bin/bunzip2
  28. # Test
  29. bzip2 --help
  30. cd ../..
  31. # Checksums
  32. if match x${UPDATE_CHECKSUMS} xTrue; then
  33. sha256sum -o ${pkg}.checksums \
  34. /usr/bin/bzip2
  35. cp ${pkg}.checksums ${SRCDIR}
  36. else
  37. sha256sum -c ${pkg}.checksums
  38. fi