summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 568056654f3f620d911aaa5fd0c1164a051f1f0d (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
# Maintainer: Brenden Hoffman <hbrenden@fastmail.com>

pkgname=fzf-tab-git
_pkgname=fzf-tab
pkgver=r199.220bee3
pkgrel=3
pkgdesc="Replace zsh's default completion selection menu with fzf (git version)"
url='https://github.com/Aloxaf/fzf-tab'
arch=('any')
license=('MIT')
depends=('zsh' 'fzf')
makedepends=('git')
conflicts=('fzf-tab-bin-git')
source=("git+https://github.com/Aloxaf/fzf-tab.git")
sha512sums=('SKIP')

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

package() {
  cd "$srcdir/$_pkgname"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -dm755 "${pkgdir}/usr/share/zsh/plugins/${pkgname}"
  cp -dr --no-preserve=ownership {fzf-tab.zsh,lib,modules,test} \
    "${pkgdir}/usr/share/zsh/plugins/${pkgname}"
  ln -s "fzf-tab.zsh" \
    "${pkgdir}/usr/share/zsh/plugins/${pkgname}/fzf-tab.plugin.zsh"
}