summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 15a975ded55a5cf195f329ca122e44a317378eb1 (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
# Maintainer: x70b1

pkgname=pam_exec-ssh
pkgver=r17.c377620
pkgrel=1
pkgdesc="Unlock SSH keys on login using PAM."
arch=(any)
url="https://github.com/x70b1/pam_exec-ssh"
license=("The Unlicense")
makedepends=("git")
depends=("pam" "expect")
source=("${pkgname}::git+${url}.git#commit=$(echo ${pkgver} | cut -d '.' -f 2)")
noextract=()
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname}
  set -o pipefail
  git describe --long 2> /dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd ${pkgname}
  install -Dm755 pam_exec-ssh "${pkgdir}"/usr/bin/pam_exec-ssh
}