1 # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
2 pkgname=graylog2-web-interface
5 pkgdesc="Graylog2 is an open source syslog implementation that stores your logs in MongoDB (web interface)"
7 url="http://graylog2.org"
9 depends=(ruby-enterprise-bundler elasticsearch)
10 source=(https://github.com/downloads/Graylog2/$pkgname/$pkgname-$pkgver.tar.gz dispatcher.rb mongoid.yml graylog2.cron)
11 install=graylog2.install
12 backup=(etc/webapps/graylog2/{email,general,mongoid}.yml)
16 cd "$srcdir/$pkgname-$pkgver"
17 /opt/ruby-enterprise/bin/bundle install --deployment --binstubs --without test development
18 find bin script -type f -exec sed -i 's|^#!/usr/bin/env ruby|#!/opt/ruby-enterprise/bin/ruby|' {} \;
22 cd "$srcdir/$pkgname-$pkgver"
23 install -d -m0755 "$pkgdir/usr/share/webapps/graylog2"
24 install -d -m0755 "$pkgdir/etc/webapps/graylog2"
26 cp -a * "$pkgdir/usr/share/webapps/graylog2"
28 for _CONF in {email,general,mongoid}.yml; do
29 mv "$pkgdir/usr/share/webapps/graylog2/config/$_CONF" "$pkgdir/etc/webapps/graylog2/$_CONF"
30 ln -s "/etc/webapps/graylog2/$_CONF" "$pkgdir/usr/share/webapps/graylog2/config/$_CONF"
33 cp "$srcdir/mongoid.yml" "$pkgdir/etc/webapps/graylog2/mongoid.yml"
35 install -D -m0755 "$srcdir/graylog2.cron" "$pkgdir/etc/cron.d/graylog2"
36 install -D -m0755 "$srcdir/dispatcher.rb" "$pkgdir/usr/share/webapps/graylog2/public/dispatcher.rb"
39 md5sums=('9e2a4bb6f94e003326a6162fa058d9c0'
40 'bbb6b217de232f5ced44ee2a47d36067'
41 'f73e045d203a958c4082a84a2e4496b8'
42 '1dbd9485c43b5981377d1fb3d9e251b3')