aboutsummaryrefslogtreecommitdiffstats
path: root/testing/filebeat/APKBUILD
blob: 809ff2747006e3e5f03c01f062c670a7ca65edfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Contributor: Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
# Maintainer: Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
pkgname=filebeat
pkgver=6.2.4
pkgrel=0
pkgdesc="Lightweight Shipper for Logs"
pkgusers="root"
url="https://www.elastic.co/products/beats"
arch="all !armhf !aarch64"
license="Apache-2.0"
depends=""
makedepends="go"
install=""
subpackages="$pkgname-openrc"
source="beats-${pkgver}.tar.gz::https://github.com/elastic/beats/archive/v$pkgver.tar.gz
	filebeat.initd
	filebeat.confd
	filebeat.yml
	"
builddir="$srcdir/src/github.com/elastic/beats/$pkgname"

prepare() {
	mkdir -p "$srcdir/src/github.com/elastic/"
	mv "$srcdir/beats-${pkgver}" "$srcdir/src/github.com/elastic/beats"
	default_prepare
}

build() {
	cd "$builddir"
	GOPATH="$srcdir" go build -v
}

package() {
	cd "$builddir"
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -Dm644 "$srcdir/filebeat.yml" "$pkgdir/etc/$pkgname/filebeat.yml"
	install -Dm755 "$builddir/filebeat" "$pkgdir/usr/bin/filebeat"
}

sha512sums="49293e28e4ca769a88f7b889ea888a559ae7e142698714e24bf5519d00c2030237cac591590aa284f17792906a6137333173716ddf5db4496217f8b5a054b19c  beats-6.2.4.tar.gz
ea49bc4da6f66e01ad2b563d9179a992c6dc07410c8ad107f7c5ce65426ee6010871b1cbf9634310765aa5d2da0261eb2aee2c93bbe11de5f0d6d7e903402d15  filebeat.initd
25321037cd036f05186c21c73889e9b2716bbfa30597edcf90a110fca761396f30df20142e025d6175ae6ed743f08c574fa54e8df8577c1bf416bce17bec7170  filebeat.confd
b0d5fa1d37041a4f1383451107abcdab1ce15ed537f702f55756f59c2110445dcddaf7c58f2a0561e18b83e3cab72fceb9d931bae9267f1acd9d35135555d6f7  filebeat.yml"