commit: 1276f62c1af5b9bcbdabbacef8636977c5899052 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Mon Apr 11 01:48:16 2016 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Apr 11 01:48:16 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1276f62c
dev-db/rqlite: version bump to 2.1 Package-Manager: portage-2.2.28 dev-db/rqlite/Manifest | 2 + dev-db/rqlite/rqlite-2.1.ebuild | 95 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/dev-db/rqlite/Manifest b/dev-db/rqlite/Manifest index 8d40102..d3b1eaa 100644 --- a/dev-db/rqlite/Manifest +++ b/dev-db/rqlite/Manifest @@ -1,4 +1,5 @@ DIST bolt-2f846c3551b76d7710f159be840d66c3d064abbe.tar.gz 78184 SHA256 4358157d83f88a3e0fdd5b2faa810ce0e8569ce5594ce893634f0042b2dfcdab SHA512 429391842ac0ed04fb73587a1d21c2bf03a3c41f79fa192cc601ad4748a02ecd9a5ed024779a7267278f4c7a7152b1cf6d4e48ae1ceb31e52179506792ac4b51 WHIRLPOOL f0d5eabcd2936897124bc7bfc1c5e616c79d7deb0f465e9cbd2b28c6d45173e26c71303afc1a9f6e1ef513548d192d9e8c6e5addba4af4ef40edc564f82245f0 +DIST bolt-ee4a0888a9abe7eefe5a0992ca4cb06864839873.tar.gz 78144 SHA256 165a79b80801b667b9ae09becc6085ebc79a68de32403b31018010c89216d2bc SHA512 a1f1254a00c6ad05d9097e900f1918a1d05e0a945c2438e715f6d386fc0dad82b3302764afd7bfb2a43030e79c6a0271284c866caffdda216961c10e16b63e2a WHIRLPOOL 9917359c05160a4852e55d6e556b511ba374d6c16b2c78a7d9e3ad5566f7ef68dd08176993e9fac2dc7f69612dd7da12a96e0a73b5e1e19fa102b540f594b800 DIST go-metrics-345426c77237ece5dab0e1605c3e4b35c3f54757.tar.gz 13610 SHA256 2efdf7c349cb81ef75fbb812e150aac9a7c6c27417f4e84f655ff77ddb006789 SHA512 2dd120d6da4d8cfcd4546a288534f233f7073281ed3d6e7712c8a92fc11f7b800c0950835037ec936ec89e6fc2dba06088d70bc7faee6f139cc9656c0a81d4b7 WHIRLPOOL ebe0a792cb231f3ff5241f8c2526c7a7927d6d1ab138e92ae0da34ba72e54bbb4769aa14804110e61d7de280ce28a0040ebd17e79ceccec585ad48c9aac91c33 DIST go-metrics-51425a2415d21afadfd55cd93432c0bc69e9598d.tar.gz 33525 SHA256 42e9c8c59c90b84ae00dcaec111d6903a2c0e1f17ea89bdecf313ea3172e292d SHA512 1cc31cab2e0bfeb426c813b0e69fc9810be0c1024f01be81de3ea001da930dd6ff72793e4cb4895ceda7a43d0879b2c7ca6c640524d49c1080056382dc2b5e0b WHIRLPOOL 9a35efb70b827c7464a7fdb2866db93bf9e818b25a5a5038f6a0bf16ed06aaa16727c54bf08d6a18fe08cbbdca952e6878c41cdea3cea7287c87399cb22a43dd DIST go-msgpack-fa3f63826f7c23912c15263591e65d54d080b458.tar.gz 49488 SHA256 eeffbd458f4996334275f828cfd3549d32a2ba6eda359e5c9be09f091548781f SHA512 7e60a122cca007bf5455d6e15f77c24eaa5739deedc9e0c158282249e84698f873628bffa9eb7d23c1c59bda7632b1968ca770c8e1796e2d50750ac86e80fcb2 WHIRLPOOL 41745e39256ef510d42c4da413609e3bdd0621cc2acccfddabb4c8774e47b73ad46656639bed3fac2335cf1b6a2a245d3b8b4f3831cfafb2c6e7ecb90293475d @@ -12,3 +13,4 @@ DIST hashicorp-boltdb-d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee.tar.gz 8881 SHA25 DIST hashicorp-raft-057b893fd996696719e98b6c44649ea14968c811.tar.gz 60617 SHA256 0a97044468f5a7b0640296c0bf25c9b66c2f78a6df9fdd8bf8ea5d624549ea93 SHA512 cc98717d405e3ee2479d44d79a98228faba3ca3ff41064490dde7555ca35bc65d3a8765778298fd0372b6a8afd0b00e5a557b8ad736709a0534c3fc85f61f3d7 WHIRLPOOL 74fd868a541d356284482c4af37b8affd61bf9588ec8c8f631cdb65d5c019cb5e4c78472b2fe111b137bf3aaf414c49c994e03a08522342047cd140df20986c6 DIST rqlite-1.0.tar.gz 18658 SHA256 ab282d373963bd50acf32fad89e250b40c2b3f015ddfb98ac45103054a1f7ec5 SHA512 a45f1c1dee1890ce557068b1080605fc32ddc909a45ee6edc6593ae6daa610b967b3fd5ab4e91cd6189d75ff824876bbd52006c5b3e392b48d35a612d708dd7a WHIRLPOOL 759e4f17a3552d2293c548d85136f872187bdb928f341bf84b51f902c56638690534d72b968a393676d3ce09bed9c371d67692c6b16e772f5a3624442682d5d1 DIST rqlite-2.0_pre20160308.tar.gz 19443 SHA256 597afba704194e1b3a70431184057f41f57a541a59c92d5ebacf9a96762d70b6 SHA512 7361dc3b3a41d905845bbb250ae3ad7d83a50eea09044b5297fad031ecc165b35ba59e4f6ed06975d6a9936545e9c8e60e0e605d1ec09c2096f1a00d77033e74 WHIRLPOOL 8a19fa0694980df16021bac4fcee576d87e98d40c740c23506dbc16fa6ee1f24dcb925315639fd4fa7c7cc574391adc46e216a8270e13779f545808ff81c39a7 +DIST rqlite-2.1.tar.gz 22054 SHA256 0720cbf6972e83c7ca588440dee7f3c75d92baa5869244b3a36a8bb71b58af36 SHA512 fc34ef604a3b8c0d574d78e75baabdf9c1d859771a076a6cd1c11c0737d8bd412f23be44bbeb0ef6404700e22149c93f0d54e27046f9350b43e9c492b72ae457 WHIRLPOOL 2bc9f25ef533c0e55b317ad1cf2325643b772b6219e2af2e7a5510bdbae9d516f83a5547548336ba456dcb19c8ff440178a4547ff486602b99bab413bd3b839b diff --git a/dev-db/rqlite/rqlite-2.1.ebuild b/dev-db/rqlite/rqlite-2.1.ebuild new file mode 100644 index 0000000..c807155 --- /dev/null +++ b/dev-db/rqlite/rqlite-2.1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +if [[ ${PV} == *9999* ]]; then + inherit git-r3 +fi + +inherit golang-build + +KEYWORDS="~amd64" +DESCRIPTION="Replicated SQLite using the Raft consensus protocol " +EGO_PN="github.com/otoolep/rqlite/..." +HOMEPAGE="https://${EGO_PN%/*} http://www.philipotoole.com/replicating-sqlite-using-raft-consensus" +LICENSE="MIT" +SLOT="0/${PVR}" +IUSE="" +RESTRICT="test" +EGIT_REPO_URI="https://github.com/otoolep/rqlite.git" +EGIT_COMMIT="v${PV}" +SRC_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz + https://github.com/armon/go-metrics/archive/345426c77237ece5dab0e1605c3e4b35c3f54757.tar.gz -> go-metrics-345426c77237ece5dab0e1605c3e4b35c3f54757.tar.gz + https://github.com/boltdb/bolt/archive/ee4a0888a9abe7eefe5a0992ca4cb06864839873.tar.gz -> bolt-ee4a0888a9abe7eefe5a0992ca4cb06864839873.tar.gz + https://github.com/hashicorp/go-msgpack/archive/fa3f63826f7c23912c15263591e65d54d080b458.tar.gz -> go-msgpack-fa3f63826f7c23912c15263591e65d54d080b458.tar.gz + https://github.com/hashicorp/raft/archive/057b893fd996696719e98b6c44649ea14968c811.tar.gz -> hashicorp-raft-057b893fd996696719e98b6c44649ea14968c811.tar.gz + https://github.com/hashicorp/raft-boltdb/archive/d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee.tar.gz -> hashicorp-boltdb-d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee.tar.gz + https://github.com/mattn/go-sqlite3/archive/10876d7dac65f02064c03d7372a2f1dfb90043fe.tar.gz -> go-sqlite3-1.1.0_p20160307.tar.gz" + +get_archive_go_package() { + local archive=${1} uri x + for x in ${SRC_URI}; do + if [[ ${x} == http* ]]; then + uri=${x} + elif [[ ${x} == ${archive} ]]; then + break + fi + done + uri=${uri#https://} + echo ${uri%/archive/*} +} + +unpack_go_packages() { + local go_package x + # Unpack packages to appropriate locations for GOPATH + for x in ${A}; do + unpack ${x} + if [[ ${x} == *.tar.gz ]]; then + go_package=$(get_archive_go_package ${x}) + if [[ ${x%.tar.gz} -ef ${S} ]]; then + mv "${S}"{,_} || die + mkdir -p "${S}/src/${go_package%/*}" || die + mv "${S}"_ "${S}/src/${go_package}" || die || die + else + mkdir -p "${S}/src/${go_package%/*}" || die + for x in "${go_package##*/}"-*; do + if [[ ! ${x} -ef ${S} ]]; then + mv "${x}" "${S}/src/${go_package}" || die + fi + done + fi + fi + done +} + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + mv "${S}"{,_} || die + mkdir -p "$(dirname "${S}/src/${EGO_PN%/*}")" || die + mv "${S}_" "${S}/src/${EGO_PN%/*}" || die + fi + unpack_go_packages +} + +src_compile() { + # Omit $(get_golibdir_gopath) from GOPATH, in order to avoid + # interference from installed rqlite sources. + GOPATH="${WORKDIR}/${P}" \ + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die +} + +src_install() { + golang_install_pkgs +} + +golang_install_pkgs() { + dobin bin/${PN}d + insinto $(dirname "${EPREFIX}$(get_golibdir)/src/${EGO_PN%/*}") + rm -rf "${S}"/src/${EGO_PN%/*}/.git* + doins -r "${S}"/src/${EGO_PN%/*} + insinto $(dirname "${EPREFIX}$(get_golibdir)/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}") + doins -r "${S}"/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}{,.a} + dodoc "${S}/src/${EGO_PN%/*}/"{CHANGELOG,README}.md +}