-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
32 lines (29 loc) · 1.08 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pkgname=eza
pkgver=0.20.17
pkgrel=1
pkgdesc='A modern replacement for ls'
arch=('x86_64')
url='https://github.com/eza-community/eza'
license=('EUPL-1.2')
depends=('gcc-libs' 'glibc' 'libgit2')
makedepends=('rust')
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('62bcf8f1b2d087fa0c2c8365e4427ad30ffa986330413191da47061aecfe20de')
prepare() {
cd "${pkgname}-${pkgver}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${pkgname}-${pkgver}"
CFLAGS+=' -ffat-lto-objects'
cargo build --frozen --release
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
ln -s eza "${pkgdir}/usr/bin/exa"
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 -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}