dm9pZCAq-coreutils-9999.ebuild 807 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2022-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit git-r3
  5. DESCRIPTION="GNU compatible suckless coreutils"
  6. HOMEPAGE="https://notabug.org/dm9pZCAq/dm9pZCAq-coreutils"
  7. EGIT_REPO_URI="https://notabug.org/dm9pZCAq/${PN}.git"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. IUSE="path"
  11. BDEPEND=">=dev-lang/metalang99-1.8"
  12. BASEDIR="/opt/${PN}"
  13. src_install() {
  14. emake PREFIX='' DESTDIR="${ED}/${BASEDIR#/}" install
  15. local prefix=60
  16. use path && prefix=40
  17. # original PATH seted from 50baselayout
  18. # if we want to use this coreutils insetad of GNU coreutils
  19. # we need to set our path first
  20. local var_name="${PN^^}"
  21. printf '%s="%s"\n' \
  22. "${var_name/-/_}" "${BASEDIR}" \
  23. PATH "${BASEDIR}/bin" \
  24. ROOTPATH "${BASEDIR}/bin" \
  25. | newenvd - "${prefix}${PN}"
  26. }