summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 20ef0c8f1254fde8c7c453afcde447f71ea6c01a (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
# Maintainer: Tyler Langlois <ty |at| tjll |dot| net>
# Contributor: Christof "chdorner" Dorner <https://github.com/chdorner>

pkgname=riemann
pkgver=0.3.6
pkgrel=2
pkgdesc="Monitors distributed systems"
arch=('any')
url="http://$pkgname.io/"
license=('EPL')
depends=('java-runtime-headless>=8' 'bash' 'inetutils')
makedepends=('leiningen')
provides=('riemann')
conflicts=('riemann-bin')
install="$pkgname.install"
source=("https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz"
        'logging.patch'
        "$pkgname.install"
        "$pkgname.sysusers"
        "$pkgname.service")
sha256sums=('f6f3fbe0770bdda9ad1e2bb74498802633ee7652e4c5b9c3c6c5b0c55ab55d02'
            '30c09cf2432f5cc49cbd77576c6fc3251495b2862e51d81af2ab71109c2706f8'
            'c62dfdd9c723e0717d5da33dc85def9a9a8f623f671aafa9505df3790bb4d2ae'
            '18e21c05c351a8bcbd55b3a454bceb67b7dcfe1385e7cca6936fe63640c44303'
            '94181e635ae9774a76bf4169064f253b626fb09806694d34774ed06d54df35b8')
backup=("etc/$pkgname/$pkgname.config")

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  for patch in $srcdir/*.patch; do
    msg2 "Applying $(basename $patch)"
    patch -Np1 -i $patch
  done
}

build() {
    cd "$srcdir/$pkgname-$pkgver"

    lein uberjar
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  install -dm755 "$pkgdir/var/log/riemann"

  install -Dm644 pkg/tar/riemann.config "$pkgdir/etc/riemann/riemann.config"
  install -Dm755 pkg/tar/riemann        "$pkgdir/usr/bin/riemann"
  install -Dm644 target/riemann-$pkgver-standalone.jar \
                 "$pkgdir/usr/lib/riemann.jar"

  install -Dm644 "$srcdir/riemann.service" \
                 "$pkgdir/usr/lib/systemd/system/riemann.service"

  install -Dm644 "$srcdir"/riemann.sysusers \
                 "$pkgdir"/usr/lib/sysusers.d/riemann.conf
}