mongo-tools-3.4.1.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. MY_PV=${PV/_rc/-rc}
  6. MY_P=${PN}-r${MY_PV}
  7. DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
  8. HOMEPAGE="http://www.mongodb.org"
  9. SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
  10. LICENSE="Apache-2.0"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="sasl ssl"
  14. # Maintainer note:
  15. # openssl DEPEND constraint, see:
  16. # https://github.com/mongodb/mongo-tools/issues/11
  17. RDEPEND="!<dev-db/mongodb-3.0.0"
  18. DEPEND="${RDEPEND}
  19. dev-lang/go:=
  20. sasl? ( dev-libs/cyrus-sasl )
  21. ssl? ( dev-libs/openssl )"
  22. S=${WORKDIR}/${MY_P}
  23. src_prepare() {
  24. sed -e 's|go build .*|go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"|g' -i build.sh || die
  25. # ensure we use bash wrt #582906
  26. sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
  27. epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
  28. }
  29. src_compile() {
  30. local myconf
  31. if use sasl; then
  32. myconf="${myconf} sasl"
  33. fi
  34. if use ssl; then
  35. myconf="${myconf} ssl"
  36. fi
  37. ./build.sh ${myconf} || die "build failed"
  38. }
  39. src_install() {
  40. dobin bin/*
  41. }