diff options
author | Tomáš Mózes <hydrapolic@gmail.com> | 2020-01-28 14:57:00 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-02-26 18:17:22 +0200 |
commit | a728a7d116751d5bbbd301c4c28cecb6ae7abce5 (patch) | |
tree | 7aba6a63e2ca89c6b19876a3b53be3467af28608 /app-admin/filebeat/filebeat-7.5.2.ebuild | |
parent | app-admin/logstash-bin: bump to 7.5.2, drop old (diff) | |
download | gentoo-a728a7d116751d5bbbd301c4c28cecb6ae7abce5.tar.gz gentoo-a728a7d116751d5bbbd301c4c28cecb6ae7abce5.tar.bz2 gentoo-a728a7d116751d5bbbd301c4c28cecb6ae7abce5.zip |
app-admin/filebeat: bump to 7.5.2, drop old
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-admin/filebeat/filebeat-7.5.2.ebuild')
-rw-r--r-- | app-admin/filebeat/filebeat-7.5.2.ebuild | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/app-admin/filebeat/filebeat-7.5.2.ebuild b/app-admin/filebeat/filebeat-7.5.2.ebuild new file mode 100644 index 000000000000..8836479b860d --- /dev/null +++ b/app-admin/filebeat/filebeat-7.5.2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="test" + +DEPEND=">=dev-lang/go-1.12.9" +RDEPEND="!app-admin/filebeat-bin" + +# Do not complain about CFLAGS etc since go projects do not use them. +QA_FLAGS_IGNORED='.*' + +S="${WORKDIR}/src/github.com/elastic/beats" + +src_unpack() { + mkdir -p "${S%/*}" || die + default + mv beats-${PV} "${S}" || die +} + +src_prepare() { + default + + # avoid Elastic license + rm -r x-pack || die + + # use ${PV} instead of git commit id + sed -i "s/\(COMMIT_ID=\).*/\1${PV}/g" "${S}/libbeat/scripts/Makefile" || die +} + +src_compile() { + GOPATH="${WORKDIR}" emake -C "${S}/filebeat" +} + +src_install() { + keepdir /etc/${PN} + keepdir /var/{lib,log}/${PN} + + fperms 0750 /var/{lib,log}/${PN} + + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN}.initd.1" ${PN} + + docinto examples + dodoc ${PN}/{filebeat.yml,filebeat.reference.yml} + + 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/$(ver_cut 1-2)/upgrading.html" + elog "" + fi + + elog "Example configurations:" + elog "${EROOT}/usr/share/doc/${PF}/examples" +} |