summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f319d1ba8daa8863db9a663f6eef2928ef1ac7c (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: George Rawlinson <grawlinson@archlinux.org>

pkgname=dragonflydb
pkgver=0.12.0
pkgrel=1
pkgdesc='A modern replacement for Redis/Memcached'
arch=('x86_64')
url='https://dragonflydb.io'
license=('custom:BSL1.1')
depends=('openssl' 'boost-libs' 'libunwind')
makedepends=('git' 'cmake' 'ninja' 'python' 'boost')
_commit='2d83aa995e4e479ec943f0b4c489fcd1b513c621'
source=(
  "$pkgname::git+https://github.com/dragonflydb/dragonfly#commit=$_commit"
  'github.com-romage-helio::git+https://github.com/romange/helio'
)
b2sums=('SKIP'
        'SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

# TODO unbundle gperf, mimalloc, xxhash, uring.
prepare() {
  cd "$pkgname"

  # prepare git submodule(s)
  git submodule init
  git config submodule.helio.url "$srcdir/github.com-romage-helio"
  git -c protocol.file.allow=always submodule update
}

build() {
  cd "$pkgname"

  ./helio/blaze.sh -release

  cd build-opt

  ninja dragonfly
}

package() {
  cd "$pkgname"

  # binary
  install -vDm755 -t "$pkgdir/usr/bin" build-opt/dragonfly

  # documentation
  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
  cp -vr docs "$pkgdir/usr/share/doc/$pkgname"

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}