powerline/packages/archlinux/python-powerline-git/PKGBUILD

75 lines
2.6 KiB
Bash

# Maintainer: Kim Silkebækken <kim.silkebaekken+aur@gmail.com>
_gitname=powerline
_gitbranch=develop
pkgname="python-${_gitname}-git" # Workaround for missing split package support in AUR
true && pkgname=("python-${_gitname}-git" "${_gitname}-fontpatcher-git")
pkgbase=powerline
pkgver=822.225ac48
pkgrel=1
url='https://github.com/Lokaltog/powerline'
license=('MIT')
arch=('any')
makedepends=('git' 'python-setuptools')
provides=('powerline')
conflicts=('python2-powerline-git'
'powerline-git')
install="${_gitname}.install"
source=("${_gitname}::git://github.com/Lokaltog/${_gitname}.git#branch=${_gitbranch}"
"fontpatcher.py.patch"
"${install}")
sha256sums=('SKIP'
'85576097662ab4203968b5fba1d59ec2653a390cdd4db9cee8ffa7bd4c5a7253'
'7b1257cdacce60e19280f7d918e5f3aa6f13b519dff16ecc6f732c881ef63ca1')
pkgver() {
cd "${_gitname}"
echo "$(git rev-list --count ${_gitbranch}).$(git rev-parse --short ${_gitbranch})"
}
prepare() {
cd "${srcdir}/${_gitname}"
patch -p1 < ../fontpatcher.py.patch
}
package_powerline-fontpatcher-git() {
pkgdesc='OTF/TTF font patcher for Powerline symbols'
depends=('python2' 'fontforge')
cd "${_gitname}"
# Font patcher
install -Dm755 "font/fontpatcher.py" "${pkgdir}/usr/bin/powerline-fontpatcher"
install -Dm644 "font/fontpatcher-symbols.sfd" "${pkgdir}/usr/share/$_gitname/fontpatcher-symbols.sfd"
}
package_python-powerline-git() {
pkgdesc='The ultimate statusline/prompt utility.'
depends=('python>=3.2')
optdepends=('python-psutil: improved system information'
'python-pygit2: improved git support'
'zsh: better shell prompt'
'gvim: vim compiled with Python support')
cd "${_gitname}"
python setup.py install --root="${pkgdir}" --optimize=1
# Fonts
install -dm755 "${pkgdir}/etc/fonts/conf.d"
install -Dm644 "font/PowerlineSymbols.otf" "${pkgdir}/usr/share/fonts/OTF/PowerlineSymbols.otf"
install -Dm644 "font/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.avail/10-powerline-symbols.conf"
ln -s "../conf.avail/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.d/10-powerline-symbols.conf"
# Vim Plugin
install -Dm644 "powerline/bindings/vim/plugin/powerline.vim" "${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"
# Zsh Plugin
install -Dm644 "powerline/bindings/zsh/powerline.zsh" "${pkgdir}/usr/share/zsh/site-contrib/powerline.zsh"
# Tmux Configuration
install -Dm644 "powerline/bindings/tmux/powerline.conf" "${pkgdir}/usr/share/tmux/powerline.conf"
# License
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}