diff options
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/prometheus-snmp_exporter/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.8.0.ebuild | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/net-analyzer/prometheus-snmp_exporter/Manifest b/net-analyzer/prometheus-snmp_exporter/Manifest index cba6bc622a0d..c4509d6f4d89 100644 --- a/net-analyzer/prometheus-snmp_exporter/Manifest +++ b/net-analyzer/prometheus-snmp_exporter/Manifest @@ -1 +1,2 @@ DIST prometheus-snmp_exporter-0.7.0.tar.gz 3250164 SHA256 da9d0c4baa21a317a88ebbb0e836a4665614d03421d2c4ecb7df7e5217920398 SHA512 b0564fcd38eb823d136b25c3aa4e8f1df495eb6f262f105e6686adab80a794cd2cc47f51f40606aa4b51d29e0ab6851216b147b37e406e450b4f9559caaee5d1 WHIRLPOOL a0c4a7e53cc24ea712f681440be5757c40f7585037fa8a7f1e71da7aee2fb1a4084d2648e3b0076c452f7740657b710d9eb986b1e97e8b5bf44b04617d2c3405 +DIST prometheus-snmp_exporter-0.8.0.tar.gz 3257344 SHA256 740ede001e6ae0a08cda52b0efcd43b24f81431010175ae2a0c687264732860a SHA512 0cae5fc107baedd8d498972aa7c6b3b48ff19f951c5366e5be5173009e956de8da06b84a46926d6f157287df0793e996686740c491f502da24172d5806b49339 WHIRLPOOL 09b785cb3e1331198c8657f60444d491ac5270fcc39136737af1076656e5939fa59225be8edc3e8e6a0985ddc19c24e9ba97d962eb412525537fdfa4642ce371 diff --git a/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.8.0.ebuild b/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.8.0.ebuild new file mode 100644 index 000000000000..1c6964ea08bd --- /dev/null +++ b/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.8.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user golang-build golang-vcs-snapshot + +EGO_PN="github.com/prometheus/snmp_exporter" +EGIT_COMMIT="v${PV/_rc/-rc.}" +SNMP_EXPORTER_COMMIT="17cefca" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Prometheus exporter for snmp metrics" +HOMEPAGE="https://github.com/prometheus/snmp_exporter" +SRC_URI="${ARCHIVE_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="dev-util/promu" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die +} + +src_compile() { + pushd src/${EGO_PN} || die + mkdir -p bin || die + GOPATH="${S}" promu build -v --prefix snmp_exporter || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin snmp_exporter/snmp_exporter + dodoc {README,CHANGELOG,CONTRIBUTING}.md + insinto /etc/snmp_exporter + newins snmp.yml snmp.yml.example + popd || die + keepdir /var/lib/snmp_exporter /var/log/snmp_exporter + fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} |