diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:05:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:05:26 +0100 |
commit | 7b6779967898bf86cb9670457223f4237816a205 (patch) | |
tree | 2d2bf1b6b4222730e0e1e877b8038e2ae2eefbec /app-admin/filebeat/filebeat-5.6.10.ebuild | |
parent | 83c20bc401b9e577248523c6555493e36a100a41 (diff) |
gentoo resync : 14.07.2018 (2nd step)
Diffstat (limited to 'app-admin/filebeat/filebeat-5.6.10.ebuild')
-rw-r--r-- | app-admin/filebeat/filebeat-5.6.10.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/app-admin/filebeat/filebeat-5.6.10.ebuild b/app-admin/filebeat/filebeat-5.6.10.ebuild new file mode 100644 index 000000000000..4537daa105ba --- /dev/null +++ b/app-admin/filebeat/filebeat-5.6.10.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Lightweight log shipper for Logstash and Elasticsearch" +HOMEPAGE="https://www.elastic.co/products/beats" +SRC_URI="https://github.com/elastic/beats/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="test" + +DEPEND=">=dev-lang/go-1.9.2" +RDEPEND="!app-admin/filebeat-bin" + +S="${WORKDIR}/src/github.com/elastic/beats" + +src_unpack() { + mkdir -p "${S%/*}" || die + default + mv beats-${PV} "${S}" || die +} + +src_compile() { + GOPATH="${WORKDIR}" emake -C "${S}/filebeat" +} + +src_install() { + keepdir /var/{lib,log}/${PN} + + fperms 0750 /var/{lib,log}/${PN} + + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} + + docinto examples + dodoc ${PN}/{filebeat.yml,filebeat.full.yml} + + insinto "/etc/${PN}" + doins ${PN}/{filebeat.template.json,filebeat.template-es2x.json,filebeat.template-es6x.json} + + exeinto "/usr/share/${PN}" + doexe libbeat/scripts/migrate_beat_config_1_x_to_5_0.py + + dobin filebeat/filebeat +} + +pkg_postinst() { + if [[ -n "${REPLACING_VERSIONS}" ]]; then + elog "Please read the migration guide at:" + elog "https://www.elastic.co/guide/en/beats/libbeat/5.0/upgrading.html" + elog "" + elog "The migration script:" + elog "${EROOT%/}/usr/share/filebeat/migrate_beat_config_1_x_to_5_0.py" + elog "" + fi + + elog "Example configurations:" + elog "${EROOT%/}/usr/share/doc/${PF}/examples" +} |