summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1465be74af999780a6266c09939ae92d67759325 (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
# Maintainer: Sabu Siyad <ssiyad at disroot.org>
# This PKGBUILD is maintained at https://github.com/ssiyad/pkgbuilds/

# Contributor: Dmitri Goutnik <dg@syrec.org>
# Contributor: Doron Behar <doron.behar@gmail.com>

pkgname=2fa
pkgver=1.2.0
pkgrel=1
pkgdesc="Two factor authentication agent"
arch=('x86_64')
url='https://github.com/rsc/2fa'
license=('BSD')
makedepends=('go')
conflicts=('2fa-git')
replaces=('2fa-git')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=("SKIP")

prepare() {
  mkdir -p src/rsc.io
  mv ${pkgname}-${pkgver} src/rsc.io/2fa
}

build() {
  cd src/rsc.io/2fa
  env GOPATH="${srcdir}" go mod vendor && go build
}

# check() {
#   cd src/rsc.io/2fa
#   env GOPATH="${srcdir}" go test
# }

package() {
  cd src/rsc.io/2fa
  install -Dm755 2fa "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et: