pkg: add eza
This commit is contained in:
parent
5aba56b318
commit
262859c085
|
@ -0,0 +1,56 @@
|
|||
# Maintainer: blek <me@blek.codes>
|
||||
|
||||
pkgname=eza
|
||||
pkgver=0.12.0
|
||||
pkgrel=1
|
||||
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=('libgit2.so')
|
||||
makedepends=("cargo" "pandoc")
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/eza-community/eza/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('766e754c9f4632b92e4a773ac496dee8b6b83fdc9b8ed9514750058039fc5a83')
|
||||
b2sums=('ab284c0758515e738fc102ceacd238ef7315627a6c9cb6a712b9ff107ebba7e282768a5ccfd73061aee54838dba194d89ba5b35850f1de78bd3f6aaab65efdb1')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
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() {
|
||||
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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue