summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ee1e1b927c511e44d9d68cc81056ee804e48510 (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
35
36
37
38
39
40
41
42
# Maintainer:  jyantis <yantis@yantis.net>

pkgname=oh-my-zsh-powerline-theme-git
pkgver=r61.8df8e04
pkgrel=2
pkgdesc='oh-my-zsh Powerline style theme'
arch=('any')
url='https://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme'
license=('custom')
depends=('zsh' 'oh-my-zsh-git')
source=('git+https://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme.git')
sha256sums=('SKIP')
makedepends=('git')
provides=('oh-my-zsh-powerline-theme')
conflicts=('oh-my-zsh-powerline-theme')
install='oh-my-zsh-powerline-theme.install'

pkgver() {
  cd oh-my-zsh-powerline-theme
  set -o pipefail
  git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd oh-my-zsh-powerline-theme

  # We don't need anything related to git in the package
  rm -rf .git*

  # No license
  # Install Readme as License in case in the future some type of license is added
  install -D -m644 README.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # Install Documentation
  install -D -m644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"

  # Install the theme
  install -D -m644 powerline.zsh-theme "${pkgdir}/usr/share/oh-my-zsh/themes/powerline.zsh-theme"
}

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