mongo-tools-3.2.12.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. net-libs/libpcap
  21. sasl? ( dev-libs/cyrus-sasl )
  22. ssl? ( dev-libs/openssl )"
  23. S=${WORKDIR}/${MY_P}
  24. src_prepare() {
  25. sed -e 's|go build .*|go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"|g' -i build.sh || die
  26. # ensure we use bash wrt #582906
  27. sed -e 's@/bin/sh@/bin/bash@g' -i build.sh || die
  28. epatch "${FILESDIR}/${PN}-3.2.10-pie.patch"
  29. }
  30. src_compile() {
  31. local myconf
  32. if use sasl; then
  33. myconf="${myconf} sasl"
  34. fi
  35. if use ssl; then
  36. myconf="${myconf} ssl"
  37. fi
  38. ./build.sh ${myconf} || die "build failed"
  39. }
  40. src_install() {
  41. dobin bin/*
  42. }