summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c5d534e47e21fa27d3455083cb663e6c2ea53d5b (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: Netflix, Inc. <netflixoss@netflix.com>
# Contributor: Mikhail f. Shiryaev <mr<dot>felixoid<at>gmail<dot>com>

_gitname=dynomite
pkgname=${_gitname}-git
pkgver=0.6.9.r27.gce073ac
pkgrel=1
pkgdesc="Dynomite is a thin, distributed dynamo layer for different storage engines and protocols"
arch=('i686' 'x86_64')
url="https://github.com/Netflix/dynomite"
license=('Apache-2.0')
conflicts=('dynomite')
provides=('dynomite')
source=(
  "git+https://github.com/Netflix/dynomite.git"
)
md5sums=(
  'SKIP'
)

pkgver() {
  cd "${_gitname}"

  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/; s/-/./g; s/^v//' ||
    printf "%s.r%s.%s" "${_version}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}/${_gitname}"

  autoreconf -fvi
  ./configure --prefix=/usr \
    --sbindir='${exec_prefix}/bin' \
    --sysconfdir=/etc/dynomite \
    --datarootdir='${exec_prefix}/share' \
    --enable-packaging
  make
}

check() {
  cd "${srcdir}/${_gitname}"
  HOME="${srcdir}/testhome" make -k check
}

package() {
  cd "${srcdir}/${_gitname}"

  make DESTDIR="${pkgdir}" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}