logo

live-bootstrap

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

pass1.sh (1946B)


  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. # Remove pregenerated gnulib files
  13. pushd ../gnulib-bb5bb43
  14. rm lib/uniwidth/width*.h
  15. rm lib/unictype/ctype*.h
  16. rm lib/unicase/tolower.h
  17. popd
  18. . ../../import-gnulib.sh
  19. VERSION=$(basename "${BASH_SOURCE[0]}" .sh | sed 's/coreutils-//')
  20. echo "$VERSION" > .tarball-version
  21. # We don't have autopoint from gettext yet.
  22. AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
  23. }
  24. src_prepare() {
  25. default
  26. regenerate_files
  27. }
  28. src_configure() {
  29. # FORCE_UNSAFE_CONFIGURE disables "you should not run configure as root"
  30. # error from configuration system of coreutils.
  31. # gl_cv_func_getcwd_path_max is set to improve reproducibility.
  32. # In some environments, the configure script would set it to
  33. # "no, but it is partly working", and in others it would set it
  34. # to "yes", producing different build outputs.
  35. # Also, tell coreutils we don't have perl, which disables help2man
  36. FORCE_UNSAFE_CONFIGURE=1 ./configure CFLAGS="-static" \
  37. --prefix="${PREFIX}" \
  38. --build=i386-unknown-linux-musl \
  39. gl_cv_func_getcwd_path_max="no, but it is partly working" \
  40. gl_cv_prog_perl="no"
  41. }
  42. src_compile() {
  43. make "${MAKEJOBS}" PREFIX="${PREFIX}" MAKEINFO="true" GPERF="true"
  44. }
  45. src_install() {
  46. make install PREFIX="${PREFIX}" MAKEINFO="true" DESTDIR="${DESTDIR}"
  47. }