logo

live-bootstrap

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

pass1.sh (2035B)


  1. # SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
  2. # SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
  3. # SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
  4. #
  5. # SPDX-License-Identifier: GPL-3.0-or-later
  6. regenerate_files() {
  7. build-aux/gen-lists-of-programs.sh --autoconf > m4/cu-progs.m4
  8. build-aux/gen-lists-of-programs.sh --automake > src/cu-progs.mk
  9. build-aux/gen-single-binary.sh src/local.mk > src/single-binary.mk
  10. touch ChangeLog
  11. cp ../gnulib-bb5bb43/build-aux/po/Makefile.in.in po/Makefile.in.in
  12. rm man/help2man
  13. ln -s /usr/bin/help2man man/
  14. # Remove pregenerated gnulib files
  15. pushd ../gnulib-bb5bb43
  16. rm lib/uniwidth/width*.h
  17. rm lib/unictype/ctype*.h
  18. rm lib/unicase/tolower.h
  19. popd
  20. . ../../import-gnulib.sh
  21. VERSION=$(basename "${BASH_SOURCE[0]}" .sh | sed 's/coreutils-//')
  22. echo "$VERSION" > .tarball-version
  23. rm gl/tests/test-rand-isaac.c
  24. # We don't have autopoint from gettext yet.
  25. AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
  26. }
  27. src_prepare() {
  28. default
  29. regenerate_files
  30. }
  31. src_configure() {
  32. # FORCE_UNSAFE_CONFIGURE disables "you should not run configure as root"
  33. # error from configuration system of coreutils.
  34. # gl_cv_func_getcwd_path_max is set to improve reproducibility.
  35. # In some environments, the configure script would set it to
  36. # "no, but it is partly working", and in others it would set it
  37. # to "yes", producing different build outputs.
  38. # Also, tell coreutils we don't have perl, which disables help2man
  39. FORCE_UNSAFE_CONFIGURE=1 ./configure CFLAGS="-static" \
  40. --prefix="${PREFIX}" \
  41. --build=i386-unknown-linux-musl \
  42. gl_cv_func_getcwd_path_max="no, but it is partly working" \
  43. gl_cv_prog_perl="no"
  44. }
  45. src_compile() {
  46. make "${MAKEJOBS}" PREFIX="${PREFIX}" MAKEINFO="true" GPERF="true"
  47. }
  48. src_install() {
  49. make install PREFIX="${PREFIX}" MAKEINFO="true" DESTDIR="${DESTDIR}"
  50. }