mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-db/rqlite: add 2.0_pre20160308 snapshot
Package-Manager: portage-2.2.27
This commit is contained in:
@@ -11,3 +11,4 @@ DIST gorilla-mux-26a6070f849969ba72b72256e9f14cf519751690.tar.gz 23501 SHA256 23
|
||||
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
|
||||
DIST rqlite-2.0_pre20160308.tar.gz 19443 SHA256 597afba704194e1b3a70431184057f41f57a541a59c92d5ebacf9a96762d70b6 SHA512 7361dc3b3a41d905845bbb250ae3ad7d83a50eea09044b5297fad031ecc165b35ba59e4f6ed06975d6a9936545e9c8e60e0e605d1ec09c2096f1a00d77033e74 WHIRLPOOL 8a19fa0694980df16021bac4fcee576d87e98d40c740c23506dbc16fa6ee1f24dcb925315639fd4fa7c7cc574391adc46e216a8270e13779f545808ff81c39a7
|
||||
|
||||
95
dev-db/rqlite/rqlite-2.0_pre20160308.ebuild
Normal file
95
dev-db/rqlite/rqlite-2.0_pre20160308.ebuild
Normal file
@@ -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="f65218201d46804e52459301b1e6c8a3af2c21ad"
|
||||
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/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/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%/*}/README.md"
|
||||
}
|
||||
@@ -90,6 +90,6 @@ golang_install_pkgs() {
|
||||
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%/*}
|
||||
doins -r "${S}"/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}{,.a}
|
||||
dodoc "${S}/src/${EGO_PN%/*}/README.md"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user