summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 348f7221e4e22f9e0fc470b602f47d2a1f29c9eb (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: Brent George <brentdgeorge1 at gmail dot com>

pkgname=zlong-alert-git
_pkgname=zlong_alert
pkgver=r72.c6ae05c
pkgrel=1
pkgdesc="A ZSH plugin to alert you when a long-running command has finished"
arch=('any')
url='https://github.com/kevinywlui/zlong_alert.zsh'
license=('MIT')
depends=('zsh' 'oh-my-zsh-git')
makedepends=('git')
install="${_pkgname}.install"
source=("${pkgname}::git+https://github.com/kevinywlui/zlong_alert.zsh")
b2sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"

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

package() {
  cd "${srcdir}/${pkgname}"

  install -vDm 644 "LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
  install -vDm 644 ${_pkgname}{,.plugin}.zsh \
    -t "${pkgdir}/usr/share/oh-my-zsh/custom/plugins/${_pkgname}/"
}

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