blob: e90f0ab0e672c5222882e0adc07d45e0881a7432 (
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
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild,v 1.3 2012/11/30 16:36:29 flameeyes Exp $
EAPI=5
inherit git-2 multilib
EGIT_REPO_URI="https://github.com/Flameeyes/${PN}.git"
SRC_URI=""
KEYWORDS=""
DESCRIPTION="Flameeyes's custom Nagios/Icinga plugins"
HOMEPAGE="https://github.com/Flameeyes/nagios-plugins-flameeyes"
LICENSE="MIT"
SLOT="0"
IUSE="smart samba"
RDEPEND="
dev-perl/Nagios-Plugin
sys-apps/portage
dev-perl/Time-Duration
dev-perl/TimeDate
smart? (
sys-apps/smartmontools
app-admin/sudo
)
samba? ( dev-perl/Filesys-SmbClient )"
DEPEND=""
src_compile() {
cat - > "${T}"/50${PN} <<EOF
Cmnd_Alias NAGIOS_PLUGINS_FLAMEEYES_CMDS = /usr/sbin/smartctl
User_Alias NAGIOS_PLUGINS_FLAMEEYES_USERS = nagios, icinga
NAGIOS_PLUGINS_FLAMEEYES_USERS ALL=(root) NOPASSWD: NAGIOS_PLUGINS_FLAMEEYES_CMDS
EOF
}
src_install() {
insinto /etc/sudoers.d
doins "${T}"/50${PN}
dodir /usr/$(get_libdir)/nagios/plugins/flameeyes
cp -Rp $(find . -type d -mindepth 1 -maxdepth 1 -not -name .git) \
"${D}/usr/$(get_libdir)/nagios/plugins/flameeyes" || die
dodoc README.md
}
|