logo

live-bootstrap

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

pass2.sh (1337B)


  1. # SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
  2. #
  3. # SPDX-License-Identifier: GPL-3.0-or-later
  4. src_prepare() {
  5. default
  6. # Regnerate src/tool_cb_prg.c
  7. sed '/sinus/q' src/tool_cb_prg.c > src/tool_cb_prg.c.new
  8. perl sinus.pl | sed "s/, $//" >> src/tool_cb_prg.c.new
  9. sed '1,/^[0-9, ]*[0-9]$/d' src/tool_cb_prg.c >> src/tool_cb_prg.c.new
  10. mv src/tool_cb_prg.c.new src/tool_cb_prg.c
  11. # pregenerated files
  12. rm src/tool_listhelp.c src/tool_hugehelp.c lib/easyoptions.c
  13. rm docs/libcurl/libcurl-symbols.md
  14. rm tests/certs/*.der
  15. AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
  16. }
  17. src_configure() {
  18. LDFLAGS="-static" ./configure \
  19. --prefix="${PREFIX}" \
  20. --libdir="${LIBDIR}" \
  21. --build=i386-unknown-linux-musl \
  22. --enable-ipv6 \
  23. --with-openssl \
  24. --without-libpsl \
  25. --with-ca-bundle=/etc/ssl/certs.pem
  26. }
  27. src_compile() {
  28. # Recreate tool_help.h
  29. sed '/bitmask output/{n; n; n; n; q}' src/tool_help.h > src/tool_help.h.new
  30. make -s -C docs/cmdline-opts listcats >> src/tool_help.h.new
  31. sed '1,/CURLHELP_VERBOSE/d' src/tool_help.h >> src/tool_help.h.new
  32. mv src/tool_help.h.new src/tool_help.h
  33. # tool_listhelp.c and easyoptions.c
  34. make -C src listhelp
  35. make -C lib optiontable
  36. default
  37. }