blob: e56c277678f3d0ffb8be1fb43d0f8d69f583662b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
MY_PN="nagios-plugins-linux"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Additional and alternative Nagios plugins for Linux"
HOMEPAGE="https://github.com/madrisan/nagios-plugins-linux"
SRC_URI="https://github.com/madrisan/${MY_PN}/releases/download/v${PV}/${MY_P}.tar.xz -> ${P}.tar.xz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="curl"
DEPEND="curl? ( net-misc/curl:0= )"
RDEPEND="${DEPEND}"
# https://github.com/madrisan/nagios-plugins-linux/issues/48
# Will be in the next release
# https://github.com/madrisan/nagios-plugins-linux/pull/52
PATCHES=(
"${FILESDIR}/${P}-fix-fno-common.patch"
"${FILESDIR}/${P}-fix-musl-build.patch"
)
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
# Avoid collision with net-analyzer/monitoring-plugins
# and net-analyzer/nagios-plugins
sed -ri "s/check_(load|swap|uptime|users)/&_madrisan/" plugins/Makefile.am || die
eautoreconf
}
src_configure() {
local myconf=(
--libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins"
# Most options are already defaults for Gentoo
--disable-hardening
$(use_enable curl libcurl)
)
econf "${myconf[@]}"
}
src_test() {
emake check VERBOSE=1
}
|