commit:     01ac494ca6cc0f2c677b728fdf69637b6b828cf1
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 10 17:59:39 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jul 10 18:00:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01ac494c

app-metrics/redis_exporter: migrate 1.2.1 to go-module

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 app-metrics/redis_exporter/redis_exporter-1.2.1.ebuild | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/app-metrics/redis_exporter/redis_exporter-1.2.1.ebuild 
b/app-metrics/redis_exporter/redis_exporter-1.2.1.ebuild
index 266c339cba7..d983bd4de2f 100644
--- a/app-metrics/redis_exporter/redis_exporter-1.2.1.ebuild
+++ b/app-metrics/redis_exporter/redis_exporter-1.2.1.ebuild
@@ -2,20 +2,17 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit user golang-build golang-vcs-snapshot systemd
-
-EGO_PN="github.com/oliver006/redis_exporter"
-EGIT_COMMIT="55b9cfabb601b5a71822fa396f914a07a31dcbe4"
-ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="~amd64"
+inherit go-module user systemd
+EGIT_COMMIT=55b9cfabb601b5a71822fa396f914a07a31dcbe4
 
 DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x 
and 4.x"
 HOMEPAGE="https://github.com/oliver006/redis_exporter";
-SRC_URI="${ARCHIVE_URI}"
+SRC_URI="https://github.com/oliver006/redis_exporter/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
 LICENSE="MIT Apache-2.0 BSD"
 SLOT="0"
+KEYWORDS="~amd64"
 IUSE=""
-S=${WORKDIR}/${P}/src/${EGO_PN}
 
 pkg_setup() {
        enewgroup ${PN}
@@ -48,9 +45,8 @@ src_prepare() {
 }
 
 src_compile() {
-       export -n GOCACHE XDG_CACHE_HOME #684052
-       export GO111MODULE=on GOFLAGS="-mod=vendor -v -x" 
GOBIN="${WORKDIR}/${P}/bin"
-       go install -work ${EGO_BUILD_FLAGS} \
+       export GOBIN="${S}/bin"
+       go install -mod=vendor \
                -ldflags="-X main.BuildVersion=${PV} -X 
main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \
                "${EGO_PN}" || die
 }

Reply via email to