_realname=ssh-pageant
pkgname="${_realname}"
pkgver=1.4.r15.gc804ba4
pkgrel=1
pkgdesc="An SSH authentication agent for Cygwin/MSYS to PuTTY's Pageant"
_commit="c804ba43bfd63bc058b7ab86a96953572511e263"
url="https://github.com/cuviper/ssh-pageant"
license=("spdx:GPL-3.0-or-later")
arch=("i686" "x86_64")
makedepends=("git" "gcc")
provides=("${_realname}-git")
conflicts=("${_realname}-git")
replaces=("${_realname}-git")
source=("${_realname}"::"git+https://github.com/cuviper/ssh-pageant.git#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_realname"

  git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_realname"
  make
}

package() {
  cd "$srcdir/$_realname"
  make PREFIX=${pkgdir}/usr install
}
