summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5989ce17c9ac32cab606a0e0852e3cebdcbc39d (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
# Maintainer: Erik Bender <erik.bender@develerik.dev>

_pkgname=git-credential-1password
_orga=develerik
_gourl=github.com/$_orga/$_pkgname

pkgname="${_pkgname}-dev-git"
pkgver=autogenerated
pkgrel=1
pkgdesc="Git credential.helper using 1Password for storage"
arch=('x86_64')
url="https://$_gourl"
license=('ISC')
makedepends=('git' 'go>=1.16' 'make')
depends=('git' '1password-cli')
provides=('git-credential-1password')
conflicts=("$_pkgname-git" "$_pkgname-bin" "$_pkgname")
source=("git+https://$_gourl.git#branch=develop")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd $srcdir/$_pkgname
  VERSION=$pkgver make credential-helper
}

package() {
  cd ${srcdir}/${_pkgname}/bin
  install -DT -m0755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}