mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 05:46:01 +02:00
arch: add fontpatcher to archlinux/python2-powerline.
This commit is contained in:
parent
79e7640bba
commit
ffb29d60d8
@ -2,3 +2,4 @@
|
|||||||
!.gitignore
|
!.gitignore
|
||||||
!PKGBUILD
|
!PKGBUILD
|
||||||
!*.install
|
!*.install
|
||||||
|
!*.patch
|
||||||
|
@ -21,15 +21,22 @@ conflicts=('python-powerline-git')
|
|||||||
replaces=('powerline-git')
|
replaces=('powerline-git')
|
||||||
install="${_gitname}.install"
|
install="${_gitname}.install"
|
||||||
source=("${_gitname}::git://github.com/Lokaltog/${_gitname}.git#branch=${_gitbranch}"
|
source=("${_gitname}::git://github.com/Lokaltog/${_gitname}.git#branch=${_gitbranch}"
|
||||||
|
"fontpatcher.py.patch"
|
||||||
"${install}")
|
"${install}")
|
||||||
sha256sums=('SKIP'
|
sha256sums=('SKIP'
|
||||||
'e8ab7fb51ac7244bfad973a999c9333ba4334fa391aa890489cf8c8f1211c94f')
|
'85576097662ab4203968b5fba1d59ec2653a390cdd4db9cee8ffa7bd4c5a7253'
|
||||||
|
'e8ab7fb51ac7244bfad973a999c9333ba4334fa391aa890489cf8c8f1211c94f')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${_gitname}"
|
cd "${_gitname}"
|
||||||
echo "$(git rev-list --count ${_gitbranch}).$(git rev-parse --short ${_gitbranch})"
|
echo "$(git rev-list --count ${_gitbranch}).$(git rev-parse --short ${_gitbranch})"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${srcdir}/${_gitname}"
|
||||||
|
patch -p1 < ../fontpatcher.py.patch
|
||||||
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${_gitname}"
|
cd "${_gitname}"
|
||||||
python2 setup.py install --root="${pkgdir}" --optimize=1 || return 1
|
python2 setup.py install --root="${pkgdir}" --optimize=1 || return 1
|
||||||
@ -42,6 +49,12 @@ package() {
|
|||||||
install -m644 "font/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.avail/10-powerline-symbols.conf"
|
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"
|
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..."
|
msg2 "Installing vim plugin..."
|
||||||
install -dm755 "${pkgdir}/usr/share/vim/vimfiles/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"
|
install -m644 "powerline/bindings/vim/plugin/powerline.vim" "${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"
|
||||||
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user