diff options
author | Luca Lesinigo <luca@luckyluke.org> | 2008-09-03 14:16:07 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-09-03 14:16:07 -0400 |
commit | 020ff2ce88385d5c441d9c01b324f438eefff754 (patch) | |
tree | 53dac6444f98b565577294929df7dcef125e0195 /contrib | |
parent | c2f49b916b16f3049a9263ff0b2218df9d590e97 (diff) | |
download | func-020ff2ce88385d5c441d9c01b324f438eefff754.tar.gz func-020ff2ce88385d5c441d9c01b324f438eefff754.tar.xz func-020ff2ce88385d5c441d9c01b324f438eefff754.zip |
add some gentoo/portage support files in contrib
patch from Luca Lesinigo <luca@luckyluke.org>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gentoo/func-0.23.ebuild | 61 | ||||
-rw-r--r-- | contrib/gentoo/funcd-init.d | 20 |
2 files changed, 81 insertions, 0 deletions
diff --git a/contrib/gentoo/func-0.23.ebuild b/contrib/gentoo/func-0.23.ebuild new file mode 100644 index 0000000..c25e4b8 --- /dev/null +++ b/contrib/gentoo/func-0.23.ebuild @@ -0,0 +1,61 @@ +# Gentoo Portage ebuild for func, by Luca Lesinigo +# Distributed under the terms of the GNU General Public License v2 +# +# this is pretty rough at the moment. it needs a look by someone who actually +# knows how to write ebuilds. But it's a start - it Works For Me :) +# +# Known todo list: +# - check for correct use of NEED_PYTHON and RDEPEND=dev-lang/python +# - check for correct usage of USE flags +# - write metadata.xml for local flags +# - patch init script for dependencies +# \-> currently only hald if USE=hal +# - split overlord and minion setups (is this actually useful?) +# \-> on minion could delete func/overlord directory and func scripts +# - provide config step to for cert request on the minion? +NEED_PYTHON=2.3 + +inherit distutils + +DESRIPTION="Fedora Unified Network Controller allows for running commands on remote systems in a secure way" +HOMEPAGE="https://fedorahosted.org/func/" +SRC_URI="http://people.fedoraproject.org/~mdehaan/files/func/${P}.tar.gz" + +LICENSE="GPLv2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~hppa" +IUSE="hal iptables nagios smart snmp" + +RDEPEND="app-crypt/certmaster + >=dev-lang/python-2.3 + sys-process/psmisc + hal? ( sys-apps/hal ) + iptables? ( net-firewall/iptables ) + nagios? ( net-analyzer/nagios-plugins ) + smart? ( sys-apps/smartmontools ) + snmp? ( net-analyzer/net-snmp )" + +PYTHON_MODNAME="func" + +src_install() { + distutils_src_install + newinitd "${FILESDIR}"/funcd-init.d funcd + # TODO: patch init script to depend on hald if USE=hal + + cd ${D}/usr/lib*/python*/site-packages/func + # modules with external deps + use hal || rm -f minion/modules/hardware.py + use iptables || rm -fr minion/modules/iptables + use nagios || rm -f minion/modules/nagios-check.py + use smart || rm -f minion/modules/smart.py + use snmp || rm -f minion/modules/snmp.py + # non working modules + rm -f minion/modules/service.py # TODO: implement gentoo support + rm -f minion/modules/virt.py # TODO: look in app-emulation/libvirt + rm -f minion/modules/rpms.py # what about app-arch/rpm ? + rm -f minion/modules/yumcmd.py # what about sys-apps/yum ? + # non tested modules + rm -f minion/modules/jboss.py + rm -fr minion/modules/netapp +} + diff --git a/contrib/gentoo/funcd-init.d b/contrib/gentoo/funcd-init.d new file mode 100644 index 0000000..d3ed382 --- /dev/null +++ b/contrib/gentoo/funcd-init.d @@ -0,0 +1,20 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting funcd" + start-stop-daemon --start --background --make-pidfile \ + --pidfile /var/run/funcd.pid \ + --exec /usr/bin/funcd + eend $? "Failed to start funcd" +} + +stop() { + ebegin "Stopping funcd" + start-stop-daemon --stop --quiet --pidfile /var/run/funcd.pid + eend $? "Failed to stop funcd" +} + |