logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

rebar-3.20.0.ebuild (1269B)


  1. # Copyright 2019-2022 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit bash-completion-r1 rebar3
  5. DESCRIPTION="Erlang build tool that makes it easy to compile and test Erlang applications and releases"
  6. HOMEPAGE="https://www.rebar3.org/"
  7. LICENSE="Apache-2.0 MIT BSD"
  8. SRC_URI="https://github.com/erlang/rebar3/archive/${PV}.tar.gz -> ${P}.tar.gz"
  9. S="${WORKDIR}/${PN}3-${PV}"
  10. SLOT="3"
  11. KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
  12. IUSE="test"
  13. RESTRICT="!test? ( test )"
  14. DEPEND="
  15. dev-lang/erlang[ssl]
  16. !dev-util/rebar-bin
  17. test? ( dev-erlang/meck )
  18. "
  19. RDEPEND="${DEPEND}"
  20. src_prepare() {
  21. rebar3_src_prepare
  22. sed -i 's;{deps, \[{meck, "[^"]*"}\]};{deps, []};' rebar.config || die
  23. }
  24. src_compile() {
  25. ./bootstrap || die
  26. }
  27. src_test() {
  28. ./rebar3 ct || die
  29. }
  30. src_install() {
  31. rebar3_src_install
  32. dobin rebar3
  33. doman manpages/rebar3.1
  34. dodoc rebar.config.sample
  35. newenvd - 98rebar3 <<EOF
  36. REBAR3_CMD=${EPREFIX}/usr/bin/rebar3
  37. MIX_REBAR3=${EPREFIX}/usr/bin/rebar3
  38. EOF
  39. dobashcomp apps/rebar/priv/shell-completion/bash/rebar3
  40. insinto /usr/share/fish/completion
  41. newins apps/rebar/priv/shell-completion/fish/rebar3.fish rebar3
  42. insinto /usr/share/zsh/site-functions
  43. doins apps/rebar/priv/shell-completion/zsh/_rebar3
  44. }