summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7eba02ff9ed8cd944ef15d1f99a41ca611d538f2 (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
# Maintainer: Kazuya Yokogawa <mapk0y at gmail.com>

pkgname='mairu-git'
pkgver=v0.1.0.r14.g3228c4f
pkgrel=1
pkgdesc='on-memory AWS credentials agent and executor'
url='https://github.com/sorah/mairu'
depends=('glibc' 'gcc-libs' 'openssl')
makedepends=('rust' 'git')
license=('Apache-2.0')
arch=('x86_64' 'aarch64')
#conflicts=('')
source=('git+https://github.com/sorah/mairu')
md5sums=('SKIP')
_target_name=${pkgname%-git}

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

build() {
  cd "${srcdir}/${_target_name}"
  cargo build --release
}

package() {
  cd "${srcdir}/${_target_name}"
  install -Dm755 "target/release/${_target_name}" "${pkgdir}/usr/bin/${_target_name}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_target_name}/LICENSE"
  install -Dm644 README.md "${pkgdir}/usr/share/doc/${_target_name}/README.md"
}

check() {
  "${srcdir}/${_target_name}"/target/release/${_target_name} --version
}