diff options
author | Zac Medico <zmedico@gentoo.org> | 2016-02-25 02:28:19 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2016-02-25 02:29:25 -0800 |
commit | 17a9abbf63fd24d7f37ef5919a1d77620e05af2a (patch) | |
tree | 4fad245c10609ed239d92fd37c489486eaf211a7 | |
parent | 47b1dcf4db269302833e801ff617b4c3667d17af (diff) | |
download | gentoo-17a9abbf63fd24d7f37ef5919a1d77620e05af2a.tar.gz gentoo-17a9abbf63fd24d7f37ef5919a1d77620e05af2a.tar.xz |
dev-db/rqlite: add 9999 ebuild
Package-Manager: portage-2.2.27
-rw-r--r-- | dev-db/rqlite/Manifest | 5 | ||||
-rw-r--r-- | dev-db/rqlite/rqlite-9999.ebuild | 95 |
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-db/rqlite/Manifest b/dev-db/rqlite/Manifest index ca37e846987..d198df1367b 100644 --- a/dev-db/rqlite/Manifest +++ b/dev-db/rqlite/Manifest @@ -1,7 +1,12 @@ +DIST bolt-2f846c3551b76d7710f159be840d66c3d064abbe.tar.gz 78184 SHA256 4358157d83f88a3e0fdd5b2faa810ce0e8569ce5594ce893634f0042b2dfcdab SHA512 429391842ac0ed04fb73587a1d21c2bf03a3c41f79fa192cc601ad4748a02ecd9a5ed024779a7267278f4c7a7152b1cf6d4e48ae1ceb31e52179506792ac4b51 WHIRLPOOL f0d5eabcd2936897124bc7bfc1c5e616c79d7deb0f465e9cbd2b28c6d45173e26c71303afc1a9f6e1ef513548d192d9e8c6e5addba4af4ef40edc564f82245f0 +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 DIST go-protobuf-0_pre20150809.tar.gz 151982 SHA256 160ad98eb1477492476ba566d218262fe6d326410d5a030c6a00433eaf7f9006 SHA512 04802b8d74ccaa17f9fc030badd0e74b6e47233ca5f1faab7c49f25bef2f06efd97aa4bf3f4783a7815958354744ddb9fee96d183aebbb03864069b0cc569564 WHIRLPOOL f49157a4a1a48c67b72ed38121ba28aec3f9b3405a3388097caba36643715c14b6915f9bcbd04f974fa98e9f2c4c4a4e313480ef307701c0ace734e9c214c010 DIST go-raft-75a23dbefaeea0be2869de087c2cd3379e84c424.tar.gz 39529 SHA256 9525aa5fb9b2f8ccd90e7046c182dfb658340dd7d87d33c956685aa2abb17c38 SHA512 a66ef6c72c6c4b7c857e6da95f8600435dc5586148a7ec7adedcc08b454898d1577dab3dc2048e8a3367af5d3a25cb16b042e19643d1b707dfbaf324c5c631bc WHIRLPOOL 23adb88a0048b8406ed02baf5a2089059f7c1e2ca1d360f08507635ed76d3a155b31473bcb40716280483cfdf3d95992ba5f3df83da3f8eadeaf6892b932963c DIST go-sqlite3-1.1.0_p20160131.tar.gz 1847546 SHA256 d743a044d7ee88b2783f5a15f22b47ffdaa478c0b258babc3c621ce347955bb8 SHA512 9596012111b23865191904b7b0817ddbd88fc61383a3dfcf737d3d1be95c1a1d57b779ffbb9fa83303245a992c56e427396ffccb759a440822fffa516cae0b3d WHIRLPOOL a54021a0b8deb4fd28f44e45e8c78b896ef1121e4a23eb5fe6877b259c37456a6fb4fad77300a079fc3357a14b52d0b0750286a6f15431bdfefd17a99791c7c4 DIST gorilla-context-1c83b3eabd45b6d76072b66b746c20815fb2872d.tar.gz 4263 SHA256 f4cc863669fbf9251fd249b060d61f6678a1dd6a72fc31ca5a7e93a6314a0e0f SHA512 70be60b8981beada4a5992b43edb2205852e7f6ea50c2c9020af43593f666a67765f013b6ea0adc6ccbb4348a6857b82521a5040fea8a0f3c8a5a240729372ee WHIRLPOOL e80aca1f5eec967ed0434374841b2762e26c9537217f976d006c8ca0c0e55a6567eaa6e8500dbcd0f26a6b65dcf15bbd5d494b3530bdfafe5d30302fca0248af DIST gorilla-mux-26a6070f849969ba72b72256e9f14cf519751690.tar.gz 23501 SHA256 236a2e8e99d32a4a9e1c20a6f55d877a1d0e98916e69e115befcd102fba4e6a9 SHA512 29dd57afadb59bb9a6dbe66a47e6f414b6be650e205d21e367abda8b06342550dac322d61787e61855380545d7706ad15eff6b96cf718890aee03a2b5182a023 WHIRLPOOL ffeb4f358d97cef77130187ef22e51ca1a24280bcfe4dc4fe00f04c1d6ba61aa59b61f364e4ccd361f293715aa66fc922324a624ed6b7cc8845d518a504eb9d1 +DIST hashicorp-boltdb-d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee.tar.gz 8881 SHA256 490ced07cc72baede9b997dcf92499fa0d4298926fbc51ee632bde3d3ea0979e SHA512 4f98cf8cf375561f255822cbd21b6926d3bd12ff2a1d9307b59ce5e12628034f197f6efc85d9cc9cf951eac7402b36954c2ea686bb033075ec840106614f2039 WHIRLPOOL 337d399c6b73893bb72d77a77e6b2c7b5ee914d191b719dec13f72975c0a4ece1ee6a902d32197bbf0f0300bdc3ce8efda082363a1e79a7d3f2d8aec6eb2d436 +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 diff --git a/dev-db/rqlite/rqlite-9999.ebuild b/dev-db/rqlite/rqlite-9999.ebuild new file mode 100644 index 00000000000..a3a584900b8 --- /dev/null +++ b/dev-db/rqlite/rqlite-9999.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="" +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="57e7b2b1aef8de4b6d9a78a49de2fd25c3820556" +SRC_URI=" + https://github.com/armon/go-metrics/archive/345426c77237ece5dab0e1605c3e4b35c3f54757.tar.gz -> go-metrics-345426c77237ece5dab0e1605c3e4b35c3f54757.tar.gz + https://github.com/boltdb/bolt/archive/2f846c3551b76d7710f159be840d66c3d064abbe.tar.gz -> bolt-2f846c3551b76d7710f159be840d66c3d064abbe.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/c5aee9649735e8dadac55eb968ccebd9fa29a881.tar.gz -> go-sqlite3-1.1.0_p20160131.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%/*} + dodoc "${S}/src/${EGO_PN%/*}/README.md" +} |