Skip to content
Commits on Source (2)
--- src/github.com/prometheus/node_exporter/Makefile.common.orig 2019-05-24 09:28:29.362000000 +0200
+++ src/github.com/prometheus/node_exporter/Makefile.common 2019-05-24 09:29:43.903000000 +0200
@@ -83,7 +83,7 @@
endif
endif
-PREFIX ?= $(shell pwd)
+PREFIX ?= node_exporter
BIN_DIR ?= $(shell pwd)
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
DOCKER_REPO ?= prom
@@ -182,24 +182,12 @@
ifdef GOVENDOR
@echo ">> running check for unused packages"
@$(GOVENDOR) list +unused | grep . && exit 1 || echo 'No unused packages'
-else
-ifdef GO111MODULE
- @echo ">> running check for unused/missing packages in go.mod"
- GO111MODULE=$(GO111MODULE) $(GO) mod tidy
-ifeq (,$(wildcard vendor))
- @git diff --exit-code -- go.sum go.mod
-else
- @echo ">> running check for unused packages in vendor/"
- GO111MODULE=$(GO111MODULE) $(GO) mod vendor
- @git diff --exit-code -- go.sum go.mod vendor/
-endif
-endif
endif
.PHONY: common-build
common-build: promu
@echo ">> building binaries"
- GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX)
+ USER=portage GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX)
.PHONY: common-tarball
common-tarball: promu
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit golang-base user eutils
DESCRIPTION="Prometheus exporter for machine metrics."
HOMEPAGE="http://prometheus.io"
EGO_PN="github.com/prometheus/node_exporter"
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror network-sandbox"
IUSE=""
DEPEND=">=dev-lang/go-1.11
dev-vcs/mercurial"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${P}/src/${EGO_PN}"
DAEMON_USER="prometheus"
LOG_DIR="/var/log/prometheus"
pkg_setup() {
enewuser ${DAEMON_USER} -1 -1 -1 "wheel"
}
src_unpack() {
default
mkdir -p "temp/src/${EGO_PN%/*}" || die
mv "node_exporter-${PV}" "temp/src/${EGO_PN}" || die
mv "temp" "${P}" || die
}
src_compile() {
export GOPATH="${WORKDIR}/${P}"
make
}
src_prepare() {
epatch "${FILESDIR}/${P}-Makefile.patch"
}
src_install() {
insinto "/usr/bin"
newbin "node_exporter/node_exporter" "prometheus-node-exporter"
newconfd "${FILESDIR}/${PN}-confd" "prometheus-node-exporter"
newinitd "${FILESDIR}/${PN}-initd" "prometheus-node-exporter"
keepdir "${LOG_DIR}"
fowners "${DAEMON_USER}" "${LOG_DIR}"
}
AUX installdoc.txt 383 BLAKE2B ef7d3e7f1f0c9edf5f740a0e76ec169610fc6039db7572b765b76bd0f279ccdd4d0462a71365c0015bfa6498a0329ed11595bb9ef07a3cd9b56fa1ed84ef09b8 SHA512 fa9993eda9aee3a886fc14f80620c2fa03177e3afbe0a8a530edc3aae3a11f5e4850c170f802c9a6c7d0590f0b4765a36790a4632f22077ccb01d5d310dd5a3b
AUX nginx.conf 296 BLAKE2B 390f37dd9e316c2799baf6bac5c921979c2ebe265999198af598e22455a22509b315a2403908503e47d86e8ebe7cc477ce0c9413b4440c88ee6b316150b4741d SHA512 9494339c43145b5ac5a88e2921ffd5d03c46a0258eb11827224ac29ad8ba2c8c77fe764284c50b945e7fba48837f3b8d2818ca505680006049b1b776ead751f3
EBUILD snipe-it-4.4.1.ebuild 1977 BLAKE2B 7f35079211d89e905e3e907b9820a20c5ec19108103a172da58161cce8590f6c5ec52ad7a7eb17136e948cd0feaece5e0b0505a18666b8bd261dc54de4603b42 SHA512 d865d2f8140a8845c3f9d5b4eb0c8a0ad4dd053737177891896f9803859e2d8649774d86fc7ba0bd29318566ba4144fe8f92c2be2748629baa3974a532c30afb
EBUILD snipe-it-4.5.0.ebuild 1979 BLAKE2B 4ce658bc86000fc3ca1b83a9e70e243651820cda5680d8080ce1d8d5185aeee6ead15a576046e46fcbc958a45f3a3ee50a470bda28c00bbf2fdcf10804001919 SHA512 fc7bef4dfbc95c6b53094670701618da63c843f2780abefb4c37e0d7f51f85e5e885132c1fbded8dba12c203416f21c283c0f0c23ee7fa17286300792930138a
EBUILD snipe-it-4.6.18.ebuild 1979 BLAKE2B 4ce658bc86000fc3ca1b83a9e70e243651820cda5680d8080ce1d8d5185aeee6ead15a576046e46fcbc958a45f3a3ee50a470bda28c00bbf2fdcf10804001919 SHA512 fc7bef4dfbc95c6b53094670701618da63c843f2780abefb4c37e0d7f51f85e5e885132c1fbded8dba12c203416f21c283c0f0c23ee7fa17286300792930138a
EBUILD snipe-it-4.7.4.ebuild 1979 BLAKE2B 4ce658bc86000fc3ca1b83a9e70e243651820cda5680d8080ce1d8d5185aeee6ead15a576046e46fcbc958a45f3a3ee50a470bda28c00bbf2fdcf10804001919 SHA512 fc7bef4dfbc95c6b53094670701618da63c843f2780abefb4c37e0d7f51f85e5e885132c1fbded8dba12c203416f21c283c0f0c23ee7fa17286300792930138a
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/ampache/ampache-3.5.4.ebuild,v 1.2 2012/06/22 21:24:02 mabi Exp $
EAPI="5"
inherit webapp git-2
DESCRIPTION="A free open source IT asset/license management system built in PHP on Laravel and Bootstrap."
HOMEPAGE="http://snipeitapp.com"
EGIT_REPO_URI="https://github.com/snipe/snipe-it.git"
[[ ${PV} == "9999" ]] || EGIT_COMMIT=v${PV}
LICENSE="AGPL-3"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="+ldap"
RDEPEND=">=dev-lang/php-5.4[crypt,fileinfo,pdo,mysql,unicode,curl,gd,ldap?]
dev-php/pecl-imagick
virtual/httpd-php"
DEPEND="dev-php/composer"
pkg_pretend() {
# Check for Github API token
if [[ -n "$GITHUB_API_TOKEN" ]] ; then
einfo "Using Github API token \"$GITHUB_API_TOKEN\" from environment variable GITHUB_API_TOKEN ..."
else
eerror "Please specify a Github API key in GITHUB_API_TOKEN environment"
eerror "variable to avoid exhausting the Github API limit when installing"
eerror "vendor files using PHP's composer."
eerror "You can manage your Github API tokens here: "
eerror "https://github.com/settings/tokens"
die "Please specify a Github API key in GITHUB_API_TOKEN environment variable!"
fi
}
src_prepare() {
# Composer might create this
addpredict /var/lib/net-snmp/mib_indexes
# Add Github API token to composer file
composer config -g github-oauth.github.com "$GITHUB_API_TOKEN"
einfo "Running composer ..."
composer install --no-dev --prefer-source
composer dump-autoload
}
src_install() {
webapp_src_preinst
dodoc "$FILESDIR/nginx.conf"
insinto "${MY_HTDOCSDIR}"
doins -r .
webapp_postinst_txt en "${FILESDIR}"/installdoc.txt
webapp_serverowned -R "${MY_HTDOCSDIR}/"{"storage","public/uploads"}
newins .env.example .env
webapp_configfile "${MY_HTDOCSDIR}/.env"
webapp_src_install
fperms -R 0660 "${MY_HTDOCSDIR}/"{"storage","public/uploads"}
}