arch: add fontpatcher to archlinux/python-powerline.

This commit is contained in:
Manuel Mendez 2013-06-28 22:53:02 -04:00
parent ffb29d60d8
commit 01560ae714
3 changed files with 28 additions and 1 deletions

View File

@ -2,3 +2,4 @@
!.gitignore
!PKGBUILD
!*.install
!*.patch

View File

@ -20,15 +20,22 @@ 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'
'7b1257cdacce60e19280f7d918e5f3aa6f13b519dff16ecc6f732c881ef63ca1')
'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() {
cd "${_gitname}"
python setup.py install --root="${pkgdir}" --optimize=1 || return 1
@ -41,6 +48,12 @@ package() {
install -m644 "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"
msg2 "Installing fontpatcher..."
install -dm755 "${pkgdir}/usr/share/$_gitname"
install -dm755 "${pkgdir}/usr/bin"
install -m755 "font/fontpatcher.py" "${pkgdir}/usr/bin/"
install -m644 "font/fontpatcher-symbols.sfd" "${pkgdir}/usr/share/$_gitname"
msg2 "Installing vim plugin..."
install -dm755 "${pkgdir}/usr/share/vim/vimfiles/plugin"
install -m644 "powerline/bindings/vim/plugin/powerline.vim" "${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"

View File

@ -0,0 +1,13 @@
diff --git a/font/fontpatcher.py b/font/fontpatcher.py
index e2bbf2a..aa172f6 100755
--- a/font/fontpatcher.py
+++ b/font/fontpatcher.py
@@ -21,7 +21,7 @@ except ImportError:
parser = argparse.ArgumentParser(description='Font patcher for Powerline. Requires FontForge with Python bindings. Stores the patched font as a new, renamed font file by default.')
parser.add_argument('target_fonts', help='font files to patch', metavar='font', nargs='+', type=argparse.FileType('rb'))
parser.add_argument('--no-rename', help='don\'t add " for Powerline" to the font name', default=True, action='store_false', dest='rename_font')
-parser.add_argument('--source-font', help='source symbol font', metavar='font', dest='source_font', default='{0}/fontpatcher-symbols.sfd'.format(sys.path[0]), type=argparse.FileType('rb'))
+parser.add_argument('--source-font', help='source symbol font', metavar='font', dest='source_font', default='/usr/share/powerline/fontpatcher-symbols.sfd', type=argparse.FileType('rb'))
args = parser.parse_args()