summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af2a9cc53930a4ea8097174b6e4252dae51012b1 (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
# Maintainer: Dan Beste <dan.ray.beste@gmail.com>

# TODO: Include docs!

pkgname='stratisd-git'
_gitname='stratisd'
pkgver=0.1.1.r39.g91c6498
pkgrel=1
pkgdesc='Stratis is a new tool that meets the needs of Red Hat Enterprise Linux (RHEL) users calling for an easily configured, tightly integrated solution for storage that works within the existing Red Hat storage management stack.'
arch=('i686' 'x86_64')
url='https://stratis-storage.github.io/'
license=('MPL2')
makedepends=('cargo' 'git' 'rust')
provides=("${_gitname}")
conflicts=("${_gitname}")
source=('git+https://github.com/stratis-storage/stratisd.git')
sha256sums=('SKIP')

pkgver() {
  cd "${_gitname}"

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

build() {
  cd "${_gitname}"

  make
}

check() {
  cd "${_gitname}"

  make test
}

package() {
  cd "${_gitname}"

  install -d -m 755 "${pkgdir}/usr/bin/"
  install -d -m 755 "${pkgdir}/usr/share/doc/"
  install -d -m 755 "${pkgdir}/usr/share/licenses/${_gitname}"

  install -m 755 target/release/${_gitname} "${pkgdir}/usr/bin/${_gitname}"
  install -m 644 LICENSE "${pkgdir}/usr/share/licenses/${_gitname}/LICENSE"
  cp -r target/doc/* "${pkgdir}/usr/share/doc/"
}

# vim: ts=2 sw=2 et: