app-admin/filebeat: bump to 5.2.2
authorTomas Mozes <hydrapolic@gmail.com>
Mon, 6 Mar 2017 07:55:10 +0000 (08:55 +0100)
committerGöktürk Yüksek <gokturk@gentoo.org>
Thu, 16 Mar 2017 21:37:52 +0000 (17:37 -0400)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

app-admin/filebeat/Manifest
app-admin/filebeat/filebeat-5.2.2.ebuild [new file with mode: 0644]

index c62fc44a80aad9fe839322591f9f13c35b275e74..ed529004b328df511686e61e97a43c146448787b 100644 (file)
@@ -1 +1,2 @@
 DIST filebeat-5.1.2.tar.gz 16512836 SHA256 7cd554f8be6b02290ebbc17c9820acde3dc59108672ced7a0cf5486faa3e23ce SHA512 f5ade54c3a2471680067fc5f6861ddcc052177c473f40d2135ba281e63172a4ba386368f77e5e4ba77b60c88ee20e5cd0095705aa3ed6e2588fda034de6b116f WHIRLPOOL 438119b4e5664ee0cff2a70b811ea4c247def4b15efdc1bcc243f157fe88669636c6465b93316adc2d774e5b4109856c54cc658bde2636393431b0f30a712f80
+DIST filebeat-5.2.2.tar.gz 16489808 SHA256 45c89fab339de3d3e7f9a83c7a48312ede147d5989b67b8619d9128353c891c3 SHA512 7cf54eb0b27d830e51bf97964f078874eae62e1d9642fb598cdd2f0a405db4a74e1f299c5e57e29a67cfea209b9b3c7f38bdcbe6b2e2885285b77615236971c1 WHIRLPOOL 3a708a799b3360cee12a58d858bd51f474fb86c143c6648edd451d2862ce05ae0bc9544ceef62ddbf05bc50c439a7ee041faef70214ced3e53e16e8452a9f486
diff --git a/app-admin/filebeat/filebeat-5.2.2.ebuild b/app-admin/filebeat/filebeat-5.2.2.ebuild
new file mode 100644 (file)
index 0000000..ae7e555
--- /dev/null
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 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"
+
+DEPEND=">=dev-lang/go-1.7.1"
+RDEPEND="!app-admin/filebeat-bin"
+
+ELASTIC="${WORKDIR}/src/github.com/elastic"
+BEATS="${ELASTIC}/beats"
+S="${BEATS}"
+
+src_unpack() {
+       mkdir -p "${ELASTIC}" || die
+       unpack ${P}.tar.gz
+       mv beats-${PV} "${BEATS}" || die
+}
+
+src_compile() {
+       cd ${BEATS}/filebeat || die
+       GOPATH="${WORKDIR}" emake
+}
+
+src_test() {
+       cd ${BEATS}/filebeat || die
+       GOPATH="${WORKDIR}" emake check
+}
+
+src_install() {
+       keepdir /var/{lib,log}/${PN}
+
+       fperms 0750 /var/{lib,log}/${PN}
+
+       newconfd "${FILESDIR}/${PN}.confd" ${PN}
+       newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+       insinto "/usr/share/doc/${PF}/examples"
+       doins ${PN}/{filebeat.yml,filebeat.full.yml}
+
+       insinto "/etc/${PN}"
+       doins ${PN}/{filebeat.template.json,filebeat.template-es2x.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"
+}