75 lines
1.5 KiB
Bash
75 lines
1.5 KiB
Bash
|
# Copyright 1999-2011 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Header: /var/cvsroot/gentoo-x86/www-apps/shinken/shinken-0.12.2.ebuild,v 1.4 2011/03/15 21:34:31 xarthisius Exp $
|
||
|
|
||
|
EAPI=3
|
||
|
PYTHON_DEPEND="2:2.6"
|
||
|
SUPPORT_PYTHON_ABIS="1"
|
||
|
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||
|
|
||
|
inherit distutils eutils python
|
||
|
|
||
|
DESCRIPTION="Shinken is a new monitoring tool written in Python and compatible with Nagios."
|
||
|
HOMEPAGE="http://shinken-monitoring.org/"
|
||
|
SRC_URI="http://shinken-monitoring.org/pub/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="AGPLv3"
|
||
|
SLOT="0"
|
||
|
IUSE="livestat"
|
||
|
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
|
||
|
|
||
|
RDEPEND="
|
||
|
dev-python/pyro:3
|
||
|
livestat? ( dev-python/simplejson
|
||
|
dev-python/pysqlite )
|
||
|
"
|
||
|
DEPEND="${RDEPEND}"
|
||
|
|
||
|
SHINKENMODULES="scheduler poller reactionner broker arbiter"
|
||
|
|
||
|
src_unpack() {
|
||
|
unpack ${A}
|
||
|
cd ${S}
|
||
|
epatch "${FILESDIR}/${P}.patch"
|
||
|
rm bin/*.py
|
||
|
}
|
||
|
|
||
|
pkg_setup() {
|
||
|
python_pkg_setup
|
||
|
enewgroup shinken
|
||
|
enewuser shinken -1 -1 -1 shinken
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
# python_convert_shebangs -r 2 .
|
||
|
distutils_src_prepare
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
distutils_src_install
|
||
|
# remove windows-specific configs
|
||
|
rm ${D}/etc/${PN}/*-windows.ini
|
||
|
|
||
|
keepdir /var/lib/${PN}
|
||
|
fowners shinken:shinken "/var/lib/${PN}"
|
||
|
fperms 750 "/var/lib/${PN}"
|
||
|
keepdir /var/run/${PN}
|
||
|
newconfd ${FILESDIR}/${PN}.confd ${PN}
|
||
|
newinitd ${FILESDIR}/${PN}.initd ${PN}
|
||
|
cd ${D}/etc/init.d
|
||
|
for mod in ${SHINKENMODULES}; do
|
||
|
ln -s ${PN} ${PN}.${mod} || die
|
||
|
done
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
distutils_pkg_postinst
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
distutils_pkg_postrm
|
||
|
}
|
||
|
|