summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD57
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4f22d005ee20
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = dragonflydb
+ pkgdesc = A modern replacement for Redis/Memcached
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://dragonflydb.io
+ arch = x86_64
+ license = custom:BSL1.1
+ makedepends = git
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = python
+ makedepends = boost
+ depends = openssl
+ depends = boost-libs
+ depends = libunwind
+ source = dragonflydb::git+https://github.com/dragonflydb/dragonfly#commit=29575d00ee325024aded76857e62ae01a4dfe62d
+ source = github.com-romage-helio::git+https://github.com/romange/helio
+ b2sums = SKIP
+ b2sums = SKIP
+
+pkgname = dragonflydb
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8d0bbe7f9a1e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+
+pkgname=dragonflydb
+pkgver=0.1.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='29575d00ee325024aded76857e62ae01a4dfe62d'
+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 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 doc "$pkgdir/usr/share/doc/$pkgname"
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
+}