summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f7ef46f34d30b435fc2007c9d48dea3b83efb7d (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: Danilo <aur ät dbrgn döt ch>
pkgname=kr-git
pkgver=r512.598fd9c
pkgrel=1
pkgdesc="SSH using a key stored in Kryptonite"
arch=('i686' 'x86_64')
url="https://github.com/kryptco/kr"
license=('custom')
groups=()
depends=('gcc-libs-multilib')
makedepends=('rust' 'cargo' 'go')
checkdepends=()
optdepends=()
provides=('kr')
conflicts=('kr')
backup=()
options=()
install=kr.install
changelog=
source=("git+https://github.com/kryptco/kr")
md5sums=('SKIP') 
validpgpkeys=()

pkgver() {
  cd ${srcdir}/src/github.com/kryptco/kr
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    mkdir -p "${srcdir}/src/github.com/kryptco/"
    rm -rf "${srcdir}/src/github.com/kryptco/kr"
    mv "${srcdir}/kr" "${srcdir}/src/github.com/kryptco/kr"
}

build() {
	cd "${srcdir}/src/github.com/kryptco/kr"
    GOPATH=${srcdir} make
}

check() {
	cd "${srcdir}/src/github.com/kryptco/kr"
    GOPATH=${srcdir} make check
}

package() {
	cd "${srcdir}/src/github.com/kryptco/kr"
    install -D -m 644 "LICENSE" "${pkgdir}/usr/share/licenses/kr-git/LICENSE"
    install -D -m 755 "bin/kr" "${pkgdir}/usr/bin/kr"
    install -D -m 755 "bin/krd" "${pkgdir}/usr/bin/krd"
    install -D -m 755 "bin/krssh" "${pkgdir}/usr/bin/krssh"
    install -D -m 755 "bin/kr-pkcs11.so" "${pkgdir}/usr/lib/kr-pkcs11.so"
}