aboutsummaryrefslogtreecommitdiffstats
path: root/testing/logstash/APKBUILD
blob: 58327b519a8679e85670fc2f923c811d752e0edd (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Steeve Chailloux <steeve@chaahk.com>
# Maintainer:
pkgname=logstash
pkgver=1.4.2
pkgrel=1
pkgdesc="A flexible, open source, data collection, parsing and enrichment pipeline"
url="http://logstash.net"
arch="noarch"
license="apache"
depends="openjdk7-jre-base"
depends_dev=""
makedepends="$depends_dev"
install="$pkgname.pre-install $pkgname.post-deinstall"
pkgusers="logstash"
subpackages=""
source="
    https://download.elasticsearch.org/${pkgname}/${pkgname}/${pkgname}-${pkgver}.tar.gz
    $pkgname.confd
    $pkgname.initd
    "

_builddir="${srcdir}/${pkgname}-${pkgver}"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
    echo "Nothing to build"
}

package() {
	cd "$_builddir"

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1

    # created the necessary dirs
    install -dm755 -o logstash -g daemon "$pkgdir/usr/share/logstash" || return 1
    install -dm755 -o logstash -g daemon "$pkgdir/var/log/logstash" || return 1
    install -dm755 -o logstash -g daemon "$pkgdir/var/run/logstash" || return 1
    install -dm755 -o logstash -g daemon "$pkgdir/etc/logstash" || return 1

    # copy files
    cp -r * "$pkgdir/usr/share/logstash/" || return 1
    chown -R logstash:daemon "$pkgdir/usr/share/logstash/" || return 1
}

md5sums="6e6be734392e8c7d6d55e23d0bd8d2b3  logstash-1.4.2.tar.gz
27359d9e7e41af5fe4fd77998338ea1c  logstash.confd
40465daf3f1bfbb160db982790bf46c9  logstash.initd"
sha256sums="d5be171af8d4ca966a0c731fc34f5deeee9d7631319e3660d1df99e43c5f8069  logstash-1.4.2.tar.gz
c9ecb570f2b33f5aededb590c65c4a9bb9b60321c1e05b9bb7b55cbde89c3cc7  logstash.confd
79bff7a11265489b36db5df9e281691cd06c26b6ec727fd898821823e52c4c4b  logstash.initd"
sha512sums="6bf0527446b51582fa996ae03566487f7d3de2262cf2b88c62ba2549b00027c4cd820547afb01678def235f0c49597c2b36daf69b5f3c5eb155933ca6c2b3b7b  logstash-1.4.2.tar.gz
8491786f1e8f247a4c284bb5e7c0b0c1f8332a76e61e33053e07d850975f762526a7aa7217b073f0e5c4907c1b0029bcf679c41e0b9713ce12f97b28378590df  logstash.confd
49f4785ef3f3389d5d521c4e33b6ffbb29a9192a6dd52af3e62d4e71c6a18b291461e18dce3f03e67856cc4647cf64c625e330353fd1f01f9e983800352b8652  logstash.initd"