summaryrefslogtreecommitdiff
path: root/hiredis-cmake-git/PKGBUILD
blob: c794d06d781fcd49cdb25f946983997f5a48c924 (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
# Maintainer: Aki <please at ignore pl>

pkgname=hiredis-cmake-git
pkgver=1.1.0.r4.g6f5bae8
pkgrel=1
pkgdesc="Minimalistic C client library for Redis"
arch=('i686' 'x86_64')
url="https://github.com/redis/hiredis/"
license=('BSD')
depends=('glibc')
makedepends=('git')
checkdepends=('redis')
provides=('hiredis')
conflicts=('hiredis')
options=('staticlibs')
source=("git+https://github.com/redis/hiredis.git")
sha256sums=('SKIP')


pkgver() {
  cd hiredis
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd hiredis
  cmake -B build --install-prefix="/usr"
  cd build
  make -j
}

check() {
  cd hiredis/build
  make test
}

package() {
  cd hiredis/build
  make DESTDIR="$pkgdir" install
  cd ..
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/hiredis"
}