logo

live-bootstrap

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

pass1.sh (1714B)


  1. # SPDX-FileCopyrightText: 2022,2025 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. # Make scripts work with our perl
  16. sed -i "s/:crlf//" scripts/managen scripts/cd2nroff
  17. # sed rewrites permissions?!
  18. chmod 755 scripts/managen scripts/cd2nroff
  19. # This one doesn't compile properly
  20. touch docs/libcurl/libcurl-symbols.md docs/libcurl/libcurl-symbols.3
  21. AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
  22. }
  23. src_configure() {
  24. LDFLAGS="-static" ./configure \
  25. --prefix="${PREFIX}" \
  26. --libdir="${LIBDIR}" \
  27. --build=i386-unknown-linux-gnu \
  28. --enable-ipv6 \
  29. --without-ssl \
  30. --without-libpsl \
  31. --disable-hsts
  32. }
  33. src_compile() {
  34. # Recreate tool_help.h
  35. sed '/bitmask output/{n; n; n; n; q}' src/tool_help.h > src/tool_help.h.new
  36. make -s -C docs/cmdline-opts listcats >> src/tool_help.h.new
  37. sed '1,/CURLHELP_VERBOSE/d' src/tool_help.h >> src/tool_help.h.new
  38. mv src/tool_help.h.new src/tool_help.h
  39. # tool_listhelp.c & easyoptions.c
  40. make -C src listhelp
  41. make -C lib optiontable
  42. default
  43. }
  44. src_install() {
  45. default
  46. install -m 755 scripts/mk-ca-bundle.pl "${DESTDIR}/usr/bin/mk-ca-bundle"
  47. }