summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2020-07-09 14:50:34 -0500
committerWilliam Hubbs <williamh@gentoo.org>2020-07-09 14:51:00 -0500
commitb2cf1390cdf6a833d2114b916e91b95c139727cb (patch)
tree06a0261b5e7a11046bab7f3ca2b661628c06f250 /app-metrics
parentsys-cluster/kubernetes: 1.16.12 bump (diff)
downloadgentoo-b2cf1390cdf6a833d2114b916e91b95c139727cb.tar.gz
gentoo-b2cf1390cdf6a833d2114b916e91b95c139727cb.tar.bz2
gentoo-b2cf1390cdf6a833d2114b916e91b95c139727cb.zip
app-metrics/pushgateway: migrate 1.0.0 to go-module eclass
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/pushgateway/pushgateway-1.0.0.ebuild23
1 files changed, 8 insertions, 15 deletions
diff --git a/app-metrics/pushgateway/pushgateway-1.0.0.ebuild b/app-metrics/pushgateway/pushgateway-1.0.0.ebuild
index 7a19aeed4f08..2cc3feddfe7c 100644
--- a/app-metrics/pushgateway/pushgateway-1.0.0.ebuild
+++ b/app-metrics/pushgateway/pushgateway-1.0.0.ebuild
@@ -2,23 +2,21 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit user golang-build golang-vcs-snapshot systemd
+inherit go-module user systemd
-EGO_PN="github.com/prometheus/pushgateway"
EGIT_COMMIT="v${PV/_rc/-rc.}"
GIT_COMMIT="cc61f46"
-ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="~amd64"
DESCRIPTION="Prometheus push acceptor for ephemeral and batch jobs"
HOMEPAGE="https://github.com/prometheus/pushgateway"
-SRC_URI="${ARCHIVE_URI}"
+SRC_URI="https://github.com/prometheus/pushgateway/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
LICENSE="Apache-2.0 BSD BSD-2 MIT"
SLOT="0"
+KEYWORDS="~amd64"
IUSE=""
-DEPEND=">=dev-lang/go-1.12
- >=dev-util/promu-0.3.0"
+BDEPEND=">=dev-util/promu-0.3.0"
pkg_setup() {
enewgroup ${PN}
@@ -27,22 +25,17 @@ pkg_setup() {
src_prepare() {
default
- sed -i -e "s/{{.Revision}}/${GIT_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+ sed -i -e "s/{{.Revision}}/${GIT_COMMIT}/" .promu.yml || die
}
src_compile() {
- export -n GOCACHE XDG_CACHE_HOME #672926
- pushd src/${EGO_PN} || die
mkdir -p bin || die
- GO111MODULE=on GOPATH="${S}" promu build -v --prefix bin || die
- popd || die
+ promu build -v --prefix bin || die
}
src_install() {
- pushd src/${EGO_PN} || die
- dobin bin/pushgateway
+ dobin bin/*
dodoc {README,CHANGELOG,CONTRIBUTING}.md
- popd || die
keepdir /var/lib/${PN} /var/log/${PN}
fowners ${PN}:${PN} /var/lib/${PN} /var/log/${PN}
newinitd "${FILESDIR}"/${PN}-1.initd ${PN}