summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 412eb43dc35a1cd94eb04ac85a91e8b0117bfb96 (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
# Maintainer: Felix Golatofski <contact@xdfr.de>
# Contributor: Dan Beste <dan.ray.beste@gmail.com>

pkgname='stratisd-git'
pkgver=2.0.1.r334.g35374c4d
pkgrel=1
pkgdesc='Easy to use local storage management for Linux.'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url='https://stratis-storage.github.io/'
license=('MPL2')
makedepends=('asciidoc' 'cargo' 'git' 'rust')
depends=('dbus')
optdepends=('stratis-cli: command line interface')
provides=("${pkgname/-git}")
conflicts=("${pkgname/-git}")
source=('git+https://github.com/stratis-storage/stratisd.git')
sha256sums=('SKIP')

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

build() {
  cd "${srcdir}/${pkgname/-git}"

  sed -i 's,/usr/libexec,/usr/bin,g' stratisd.service

  # Release
  make release
  make stratisd.8
}

check() {
  cd "${srcdir}/${pkgname/-git}"

  make test
}

package() {
  cd "${srcdir}/${pkgname/-git}"

  install -D -m755 "target/release/${pkgname/-git}" "${pkgdir}/usr/bin/${pkgname/-git}"
  install -D -m644 stratisd.service "${pkgdir}/usr/lib/systemd/system/stratisd.service"
  install -D -m644 org.storage.stratis2.service "${pkgdir}/usr/share/dbus-1/system-services/org.storage.stratis2.service"
  install -D -m644 stratisd.conf "${pkgdir}/usr/share/dbus-1/system.d/stratisd.conf"
  install -D -m644 docs/stratisd.8 "${pkgdir}/usr/share/man/man8/stratisd.8"
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname/-git}/LICENSE"
}

# vim: ts=2 sw=2 et: