diff options
author | zefr0x | 2023-08-05 20:34:16 +0300 |
---|---|---|
committer | zefr0x | 2023-08-05 20:34:16 +0300 |
commit | 87a0f1eba474fa5932c8493e157a956fb395853a (patch) | |
tree | a1bcaccf2e1fa29bf24af4221f70d82e210f3964 | |
download | aur-87a0f1eba474fa5932c8493e157a956fb395853a.tar.gz |
First commit
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 60 |
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..06272b6985e1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = eza-git + pkgdesc = A modern replacement for ls + pkgver = 0.10.5 + pkgrel = 1 + url = https://github.com/cafkafk/eza + arch = x86_64 + license = MIT + checkdepends = cargo + makedepends = cargo + source = eza-git::git+https://github.com/cafkafk/eza#branch=main + sha512sums = SKIP + +pkgname = eza-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f71c635dafda --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..067a00e65150 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: zefr0x < Matrix: "@zer0-x:kde.org" > + +pkgname="eza-git" +_pkgname=${pkgname%-git} +pkgver=0.10.5 +pkgrel=1 +pkgdesc="A modern replacement for ls" +arch=("x86_64") +url="https://github.com/cafkafk/eza" +license=("MIT") +makedepends=("cargo") +checkdepends=("cargo") +source=("${pkgname}::git+${url}#branch=main") +sha512sums=("SKIP") + +prepare() { + cd "${pkgname}" + + git reset --hard "$(git describe --tags --abbrev=0 --match 'v*')" + + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +pkgver() { + cd "${pkgname}" + + git describe --tags --abbrev=0 --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${pkgname}" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + + cargo build --frozen --release --all-features +} + +check() { + cd "${pkgname}" + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd "${pkgname}" + + install -Dm755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + + # Install shell completions. + install -Dm644 "completions/zsh/_${_pkgname}" "${pkgdir}/usr/share/zsh/site-functions/_${_pkgname}" + install -Dm644 "completions/bash/${_pkgname}" "${pkgdir}/usr/share/bash-completion/completions/${_pkgname}" + install -Dm644 "completions/fish/${_pkgname}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${_pkgname}.fish" + + # TODO: Install man pages + # install -Dm644 man/* -t "${pkgdir}/usr/share/man/man1/" + + install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md" + + install -Dm644 "LICENCE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE-MIT" +} |