diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild')
-rw-r--r-- | app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild b/app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild new file mode 100644 index 000000000000..af3f9b652cfb --- /dev/null +++ b/app-admin/mms-agent/mms-agent-3.7.0.212_p1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils user + +MY_PV=${PV/_p/-} + +DESCRIPTION="MongoDB MMS agents" +HOMEPAGE="http://mms.mongodb.com" +SRC_URI=" + monitoring? ( + amd64? ( https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent-${MY_PV}.linux_x86_64.tar.gz ) + x86? ( https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent-${MY_PV}.linux_i386.tar.gz ) + ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+monitoring" + +REQUIRED_USE="|| ( monitoring )" + +RDEPEND="!<dev-db/mongodb-3.0.0[mms-agent]" +DEPEND="${RDEPEND}" + +S=${WORKDIR} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb +} + +src_install() { + if use amd64; then + local arch="x86_64" + else + local arch="i386" + fi + + if use monitoring; then + local MY_PN="mms-monitoring-agent" + local MY_D="/opt/${MY_PN}" + + pushd "${S}/mongodb-mms-monitoring-agent-${MY_PV}.linux_${arch}" + + insinto ${MY_D} + doins mongodb-mms-monitoring-agent + fperms +x "${MY_D}"/mongodb-mms-monitoring-agent + + insinto /etc + doins monitoring-agent.config + rm monitoring-agent.config + dosym ../../etc/monitoring-agent.config ${MY_D}/monitoring-agent.config + + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN} + + popd + fi +} + +pkg_postinst() { + if use monitoring; then + elog "MMS Monitoring Agent configuration file :" + elog " /etc/monitoring-agent.config" + fi +} |