[arch-commits] Commit in powerline/trunk (PKGBUILD)
Jiachen Yang
farseerfc at archlinux.org
Thu Mar 12 01:05:48 UTC 2020
Date: Thursday, March 12, 2020 @ 01:05:47
Author: farseerfc
Revision: 594861
upgpkg: powerline 2.7-5: powerline 2.7-5 add systemd user service
Modified:
powerline/trunk/PKGBUILD
----------+
PKGBUILD | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-12 01:02:44 UTC (rev 594860)
+++ PKGBUILD 2020-03-12 01:05:47 UTC (rev 594861)
@@ -10,7 +10,7 @@
pkgname=("powerline" "powerline2" "python-powerline" "python2-powerline" "powerline-common" "powerline-vim" "powerline-fonts")
pkgdesc='Statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome, i3 and Qtile'
pkgver=2.7
-pkgrel=4
+pkgrel=5
url="https://github.com/${_pkgname}/${_pkgname}"
license=('MIT')
arch=('x86_64')
@@ -32,30 +32,30 @@
prepare() {
# fix https://bugs.archlinux.org/task/48358
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
find scripts -type f -iname "powerline-*" -print0 | xargs -0 sed -i "1s/env //"
- find ${_pkgname}/bindings -type f -iname "*.py" -print0 | xargs -0 sed -i "1s/env //"
+ find "${_pkgname}"/bindings -type f -iname "*.py" -print0 | xargs -0 sed -i "1s/env //"
# explicitly fail if building binary usr/bin/powerline has any error
patch -N <../fail-on-binary-error.patch
- cp -r ${srcdir}/${_pkgname}-${pkgver}{,-py2}
+ cp -r "${srcdir}/${_pkgname}-${pkgver}"{,-py2}
# prepare python2 scripts
- cd ${srcdir}/${_pkgname}-${pkgver}-py2
+ cd "${srcdir}/${_pkgname}-${pkgver}-py2"
find scripts -type f -iname "powerline-*" -print0 | xargs -0 sed -i "1s/python/python2/"
- find ${_pkgname}/bindings -type f -iname "*.py" -print0 | xargs -0 sed -i "1s/python/python2/"
+ find "${_pkgname}"/bindings -type f -iname "*.py" -print0 | xargs -0 sed -i "1s/python/python2/"
}
build(){
# build main pages
- cd ${srcdir}/${_pkgname}-${pkgver}/docs
+ cd "${srcdir}/${_pkgname}-${pkgver}/docs"
make man
# build C client
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py build
- cd ${srcdir}/${_pkgname}-${pkgver}-py2
+ cd "${srcdir}/${_pkgname}-${pkgver}-py2"
python2 setup.py build
}
@@ -62,9 +62,9 @@
# FIXME Currently test will fail with dividers and other errors
check(){
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
LC_ALL=C python setup.py test
- cd ${srcdir}/${_pkgname}-${pkgver}-py2
+ cd "${srcdir}/${_pkgname}-${pkgver}-py2"
LC_ALL=C python2 setup.py test
}
@@ -73,7 +73,7 @@
conflicts=('powerline2' 'python-powerline<=2.3-1')
replaces=('python-powerline<=2.3-1')
- cd ${srcdir}/${_pkgname}-${pkgver}/scripts
+ cd "${srcdir}/${_pkgname}-${pkgver}/scripts"
install -Dm755 powerline "${pkgdir}/usr/bin/powerline"
install -Dm755 powerline-config "${pkgdir}/usr/bin/powerline-config"
install -Dm755 powerline-daemon "${pkgdir}/usr/bin/powerline-daemon"
@@ -82,6 +82,12 @@
install -dm755 "${pkgdir}/usr/share/powerline/"
ln -s "$(python3 -c 'import site; print(site.getsitepackages()[0])')/powerline/bindings" "${pkgdir}/usr/share/powerline/bindings"
+
+ # install systemd user service
+ # see https://github.com/powerline/powerline/issues/1447
+ # and https://bugs.archlinux.org/task/65781
+ cd "${srcdir}/${_pkgname}-${pkgver}/powerline/dist/systemd"
+ install -Dm644 powerline-daemon.service "${pkgdir}/usr/lib/systemd/user/powerline-daemon.service"
# license is installed by powerline-common
}
@@ -92,7 +98,7 @@
provides=('powerline')
replaces=('python2-powerline<=2.3-1')
- cd ${srcdir}/${_pkgname}-${pkgver}-py2/scripts
+ cd "${srcdir}/${_pkgname}-${pkgver}-py2/scripts"
install -Dm755 powerline{,-config,-daemon,-lint,-render} -t "${pkgdir}/usr/bin/"
install -dm755 "${pkgdir}/usr/share/powerline/"
ln -s "$(python2 -c 'import site; print(site.getsitepackages()[0])')/powerline/bindings" "${pkgdir}/usr/share/powerline/bindings"
@@ -112,7 +118,7 @@
)
# install by redirect scripts and binaries
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py install --skip-build --root="${pkgdir}" --install-data=tmp --install-scripts=tmp --optimize=1
# remove redirected scripts and binaries
rm -rf "${pkgdir}/tmp"
@@ -131,7 +137,7 @@
)
# install by redirect scripts and binaries
- cd ${srcdir}/${_pkgname}-${pkgver}-py2
+ cd "${srcdir}/${_pkgname}-${pkgver}-py2"
python2 setup.py install --skip-build --root="${pkgdir}" --install-data=tmp --install-scripts=tmp --optimize=1
# remove redirected scripts and binaries
rm -rf "${pkgdir}/tmp"
@@ -143,7 +149,7 @@
package_powerline-common(){
pkgdesc='common files for python-powerline and python2-powerline'
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
# license
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
@@ -162,7 +168,7 @@
provides=('otf-powerline-symbols')
depends=('powerline-common')
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
install -dm755 "${pkgdir}/etc/fonts/conf.d"
install -Dm644 "font/PowerlineSymbols.otf" "${pkgdir}/usr/share/fonts/OTF/PowerlineSymbols.otf"
@@ -180,7 +186,7 @@
conflicts=('python2-powerline-vim')
provides=('python2-powerline-vim')
- cd ${srcdir}/${_pkgname}-${pkgver}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
install -Dm644 "powerline/bindings/vim/plugin/powerline.vim" \
"${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"
More information about the arch-commits
mailing list