aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f37079ac084f2558e84056c70d043b061f31d824 (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
# Maintainer: Squalou <squalou.jenkins [at] gmail [dot] com>
pkgname=zsh-git-prompt-git
pkgver=v0.3.r129.g11b83ba
pkgrel=1
pkgdesc="a nice and fast python based zsh-git-prompt (haskell support not packaged)"
arch=('x86_64' 'i686')
url="https://github.com/starcraftman/zsh-git-prompt.git"
license=('MIT')
depends=('python>=2.7.1')
conflicts=("zsh-git-prompt")
instdir=/usr/lib/${pkgname%-git}

[[ $CARCH == 'x86_64' ]] && _arch='x64' || _arch='ia32'

source=("${pkgname%-git}::git+${url}#branch=master")

sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  ( 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() {
  install -dm755 "${pkgdir}${instdir}"
  install -Dm644 "${srcdir}/${pkgname%-git}/zshrc.sh" "${pkgdir}${instdir}/"
  install -Dm644 "${srcdir}/${pkgname%-git}/gitstatus.py" "${pkgdir}${instdir}/"
}