1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
2 # Contributor: Jeff Henson <jeff@henson.io>
3 # Contributor: Ron Asimi <ron dot asimi at gmail dot com>
4 # Contributor: Roman Perepelitsa <roman.perepelitsa@gmail.com>
6 pkgname=zsh-theme-powerlevel10k
7 # Whenever pkgver is updated, _libgit2ver below must also be updated.
9 _libgit2ver="tag-d6c37a38587c9af2a9e63449fc8bf951dca0e854"
11 pkgdesc="Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience."
13 url='https://github.com/romkatv/powerlevel10k'
15 makedepends=('git' 'cmake')
16 depends=('glibc' 'zsh')
18 'powerline-fonts: patched fonts for powerline'
19 'awesome-terminal-fonts: icon package'
21 # _libgit2ver depends on pkgver. They must be updated together. See libgit2_version in:
22 # https://raw.githubusercontent.com/romkatv/powerlevel10k/v${pkgver}/gitstatus/build.info
24 "${pkgname}-${pkgver}.tar.gz::https://github.com/romkatv/powerlevel10k/archive/v${pkgver}.tar.gz"
25 "libgit2-${_libgit2ver}.tar.gz::https://github.com/romkatv/libgit2/archive/${_libgit2ver}.tar.gz")
26 sha512sums=('18c7201ac1c0d31beb166c29a5592316a439891fe26dcb3d0d4bea6fc3f02bdfe4430be59b5888a53075ea152f21d5a7bce6dcf343110596f90127f2268af36e'
27 '11fd09ce20191392947d171e9212a33a998c1f2c4bcb8ab7440a0dc88653ff1324a1529984a607d545ab8863738f4eb946134c46f44bd1c200c6d98c02657292')
28 replaces=('zsh-theme-powerlevel9k')
31 cd "${srcdir}/libgit2-${_libgit2ver}"
35 -DUSE_BUNDLED_ZLIB=ON \
36 -DREGEX_BACKEND=builtin \
37 -DUSE_HTTP_PARSER=builtin \
42 -DUSE_NTLMCLIENT=OFF \
43 -DBUILD_SHARED_LIBS=OFF \
44 -DENABLE_REPRODUCIBLE_BUILDS=ON \
49 cd "$srcdir/powerlevel10k-${pkgver}/gitstatus"
50 export CXXFLAGS+=" -I${srcdir}/libgit2-${_libgit2ver}/include -DGITSTATUS_ZERO_NSEC -D_GNU_SOURCE"
51 export LDFLAGS+=" -L${srcdir}/libgit2-${_libgit2ver}"
56 cd "$srcdir/powerlevel10k-${pkgver}"
57 find . -type f -exec install -D '{}' "$pkgdir/usr/share/zsh-theme-powerlevel10k/{}" ';'
58 # delete unnecessary files. See also: https://bugs.archlinux.org/task/66737
59 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/obj"
60 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/.gitignore"
61 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/.gitattributes"
62 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/src"
63 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/build"
64 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/deps"
65 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/Makefile"
66 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/mbuild"
67 rm "${pkgdir}/usr/share/zsh-theme-powerlevel10k/.gitattributes"
68 rm "${pkgdir}/usr/share/zsh-theme-powerlevel10k/.gitignore"
69 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/usrbin/.gitkeep"
70 rm "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/.clang-format"
71 rm -rf "${pkgdir}/usr/share/zsh-theme-powerlevel10k/gitstatus/.vscode/"
72 cd "${pkgdir}/usr/share/zsh-theme-powerlevel10k/"
73 for file in *.zsh-theme internal/*.zsh gitstatus/*.zsh gitstatus/install; do
74 zsh -fc "emulate zsh -o no_aliases && zcompile -R -- $file.zwc $file"