PKGBUILDs/extra/eza/PKGBUILD
2024-06-29 23:28:15 +00:00

76 lines
2.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Orhun Parmaksız <orhun@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove makedepend on pandoc, don't build/install manpages
pkgname=eza
pkgver=0.18.20
pkgrel=3
pkgdesc="A modern replacement for ls (community fork of exa)"
url="https://github.com/eza-community/eza"
arch=(x86_64)
license=(MIT)
provides=(exa)
replaces=(exa)
conflicts=(exa)
depends=(gcc-libs # libgcc_s.so
glibc # libc.so libm.so
libgit2
zlib)
makedepends=(cargo)
source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
"$url/commit/30d78ba5.patch")
sha256sums=('f85a7c1a1859e4fb7913d9517bd5fd04714811562b631a71705077c5aceacd78'
'92f07966466768f2e075539afcd255dca709f7b53a30f49d04d7f1ee44921e3f')
b2sums=('45f58aec92ca74bc9cfad10898cfa96e3ad1be861473c612ce2b45efb31bd8df33ea7ee8f1daab350b1280931c99b22aa49910c1e5d2413a83114ed9718b213e'
'f9f11ea49a0a7bdbaebdd8669e0722803b28281fdeb39dea79ef59bb7b714638c00ae3900e4d9f56fabb12e7a86b3ba928ad46a7fc67274f3992b687cd91dbbb')
prepare() {
cd "${pkgname}-${pkgver}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
# Backport ZSH completions fix, see https://github.com/eza-community/eza/issues/1038
patch -p1 -i ../30d78ba5.patch
}
build() {
cd "${pkgname}-${pkgver}"
# Make sure the build fails if our system libgit2 is out
# of range rather than silently starting to vendor it.
export LIBGIT2_NO_VENDOR=1
CFLAGS+=' -ffat-lto-objects'
cargo build --frozen --release
mkdir -p target/man
#for manpage in eza.1 eza_colors.5 eza_colors-explanation.5; do
# pandoc --standalone -f markdown -t man "man/${manpage}.md" > "target/man/${manpage}"
#done
}
check() {
cd "${pkgname}-${pkgver}"
cargo test --frozen
target/release/eza -la
}
package() {
depends+=(libgit2.so
libz.so)
cd "${pkgname}-${pkgver}"
install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
ln -s eza "${pkgdir}/usr/bin/exa"
# install completions
install -Dm644 "completions/bash/${pkgname}" -t "${pkgdir}/usr/share/bash-completion/completions"
install -Dm644 "completions/zsh/_${pkgname}" -t "${pkgdir}/usr/share/zsh/site-functions/"
install -Dm644 "completions/fish/${pkgname}.fish" -t "${pkgdir}/usr/share/fish/vendor_completions.d"
# install man pages
#install -Dm644 target/man/*.1 -t "${pkgdir}/usr/share/man/man1"
#install -Dm644 target/man/*.5 -t "${pkgdir}/usr/share/man/man5"
install -Dm644 LICEN?E "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim: ts=2 sw=2 et: