simpleboot-1.0.0.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright (C) 2023 dzsolt
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. DESCRIPTION="Dependency-free, all-in-one boot loader and bootable disk image creator."
  5. HOMEPAGE="https://gitlab.com/bztsrc/simpleboot"
  6. LICENSE="MIT"
  7. SLOT="0"
  8. IUSE="rebuild"
  9. # If PV starts with 9999, use git-r3 for version control
  10. if [[ ${PV} == 9999* ]]; then
  11. inherit git-r3
  12. EGIT_REPO_URI='https://gitlab.com/bztsrc/simpleboot.git'
  13. else
  14. SRC_URI="https://gitlab.com/bztsrc/simpleboot/-/archive/${PV}/simpleboot-${PV}.tar.gz -> ${P}.tar.gz"
  15. KEYWORDS="~amd64 ~x86 ~arm64 ~arm"
  16. fi
  17. BDEPEND="
  18. rebuild? (
  19. dev-lang/fasm
  20. sys-devel/llvm
  21. sys-devel/lld
  22. )
  23. "
  24. src_prepare() {
  25. default
  26. # Nothing specific to prepare
  27. }
  28. src_compile() {
  29. if use rebuild; then
  30. emake -C src distclean || die "Failed to execute 'make -C src distclean'"
  31. fi
  32. emake -C src -j1 || die "Failed to build simpleboot"
  33. }
  34. src_install() {
  35. dobin src/simpleboot || die "Failed to install simpleboot"
  36. doman src/misc/simpleboot.1.gz
  37. doheader simpleboot.h
  38. }