%global repo promu Name: golang-github-prometheus-promu Version: 0.5.0 Release: 1%{?dist} Summary: Prometheus Utility Tool License: ASL 2.0 URL: https://github.com/prometheus/promu Source0: https://github.com/prometheus/promu/archive/v%{version}.tar.gz # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: golang >= 1.6 %description Promu is part of Prometheus component Builds toolchain. %prep %setup -q -n %{repo}-%{version} %build export GOPATH=$(pwd):$(pwd)/vendor:%{gopath} rm -f go.mod mkdir -p src/github.com/prometheus/promu/ ln -s $(pwd)/cmd src/github.com/prometheus/promu ln -s $(pwd)/util src/github.com/prometheus/promu ln -s $(pwd)/vendor vendor/src go build -ldflags '-linkmode=external -compressdwarf=false' %install install -d %{buildroot}%{_bindir} install -p -m 0755 promu-%{version} %{buildroot}%{_bindir}/promu %files %license LICENSE %doc README.md %doc .promu.yml %{_bindir}/promu %changelog * Mon Mar 30 2020 Javier Peña - 0.5.0-1 - Update to version 0.5.0