diff options
author | William Hubbs <williamh@gentoo.org> | 2017-06-09 10:27:36 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2017-06-09 10:27:36 -0500 |
commit | dd37cc9959d83dabc46ca9b81211f53acc42b5ea (patch) | |
tree | 90a9cff497a4dd59ac67c7404a7ac8fd5b6eba5e /dev-db/cockroach/cockroach-1.0.1.ebuild | |
parent | dev-python/incremental: Add missing setuptools dep bug 621074 (diff) | |
download | gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.tar.gz gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.tar.bz2 gentoo-dd37cc9959d83dabc46ca9b81211f53acc42b5ea.zip |
dev-db/cockroach: 1.0.1 version bump
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'dev-db/cockroach/cockroach-1.0.1.ebuild')
-rw-r--r-- | dev-db/cockroach/cockroach-1.0.1.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-db/cockroach/cockroach-1.0.1.ebuild b/dev-db/cockroach/cockroach-1.0.1.ebuild new file mode 100644 index 000000000000..212bede14658 --- /dev/null +++ b/dev-db/cockroach/cockroach-1.0.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +MY_PV=v${PV} +CHECKREQS_MEMORY="2G" + +inherit check-reqs toolchain-funcs user + +DESCRIPTION="open source database for building cloud services" +HOMEPAGE="https://www.cockroachlabs.com" +SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz" + +LICENSE="Cockroach Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=">=app-arch/xz-utils-5.2.3 + >=dev-lang/go-1.8.1 + >=dev-util/cmake-3.8.1" + +S="${WORKDIR}/cockroach-${MY_PV}" + +pkg_pretend() { + check-reqs_pkg_pretend + if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then + eerror "Cockroach cannot be built with this version of gcc." + eerror "You need at least gcc-6.0" + die "Your C compiler is too old for this package." + fi +} + +pkg_setup() { + check-reqs_pkg_setup + enewgroup cockroach + enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach +} + +src_compile() { + emake GOPATH="${S}" build +} + +src_install() { + dobin src/github.com/cockroachdb/cockroach/cockroach +insinto /etc/security/limits.d +newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf +newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach +newinitd "${FILESDIR}"/cockroach.initd-${PV} cockroach +dodir /var/log/cockroach +fowners cockroach:cockroach /var/log/cockroach +if [[ -z ${REPLACING_VERSIONS} ]]; then + ewarn "The default setup is for the first node of an insecure" + ewarn "cluster that only listens on localhost." + ewarn "Please read the cockroach manual at the following url" + ewarn "and configure /etc/conf.d/cockroach correctly if you" + ewarn "plan to use it in production." + ewarn + ewarn "http://cockroachlabs.com/docs" + fi +} |