summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 175f9fbea787d9b99bd04c606ff1ea1ae6cd2646 (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
# Maintainer: Tom Zander

pkgname=flowee
pkgver=ecc0613f
pkgrel=1
pkgdesc="Flowee the Hub"
arch=('i686' 'x86_64')
url="http://flowee.org/"
license=('GPL')
depends=('boost-libs' 'libevent' 'openssl')
makedepends=('boost' 'cmake')
provides=('flowee-hub')
backup=("etc/flowee/flowee.conf")
install=flowee.install
source=("git+https://github.com/floweethehub/hub.git#branch=master"
    "flowee.logrotate"
    "flowee.conf"
    "logs.conf")

sha256sums=('SKIP'
    "d09fe561ed2b5fa0abf40bb5bfce0d6294b3747f97b94b473d040bda7b212985"
    "c02e66610a93f1f8b302b5409aa094ec8fd842698f2f7b54d8645bebae3da98b"
    "635bf93ae346f7a8f4baf61d2d8316aa24647e87d23847876302330cb1e1191b")

pkgver() {
  cd "$srcdir/hub"
  git rev-parse --short HEAD
}

build() {
  mkdir -p build
  cd build
  cmake -Dmark_release=true -Dbuild_tests=true -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/ ../hub
  make -j1 univalue
  make
}

check() {
  ./build/testing/test/test_hub
}

package() {
  cd build
  make install
  cd "$pkgdir"
  mv usr/etc .
  chmod 775 etc/flowee
  mv etc/flowee/flowee.conf etc/flowee/flowee-example.conf
  install -Dm 664 "$srcdir/flowee.conf" -t "$pkgdir/etc/flowee"
  install -Dm 664 "$srcdir/logs.conf" -t "$pkgdir/etc/flowee"
  install -Dm 644 "$srcdir/hub/support/thehub.service" -t "$pkgdir/usr/lib/systemd/system"
}