updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / graylog2-web-interface / PKGBUILD
blobc80c775cc7c23156cc19886788987815cf7cfb33
1 # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
2 pkgname=graylog2-web-interface
3 pkgver=0.9.6
4 pkgrel=2
5 pkgdesc="Graylog2 is an open source syslog implementation that stores your logs in MongoDB (web interface)"
6 arch=(any)
7 url="http://graylog2.org"
8 license=('GPL')
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)
13 options=(!strip)
15 build() {
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|' {} \;
21 package() {
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"
31         done
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')