archrelease: copy trunk to community-any
[ArchLinux/community.git] / felix-rs / repos / community-x86_64 / PKGBUILD
blob64e466571764bc3535929b6412e244413aa3379e
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Contributor: Kyohei Uto <im@kyoheiu.dev>
4 pkgname=felix-rs
5 _pkgname=felix
6 pkgver=2.2.7
7 pkgrel=1
8 pkgdesc="A TUI file manager with Vim-like key mapping"
9 arch=('x86_64')
10 url="https://github.com/kyoheiu/felix"
11 license=('MIT')
12 depends=('gcc-libs' 'bzip2')
13 makedepends=('cargo')
14 optdepends=('chafa: preview images'
15             'zoxide: jump to directories')
16 checkdepends=('zoxide')
17 install="$pkgname.install"
18 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
19 sha512sums=('5f4f571c62b9a8c7fdddc1e2e3c7058f24075c70843d707c0c9053fd1cbf3402bef96f537a2767f99d258843eece9d58a1f8a7f8d20a55810c4e1da8517b6986')
20 options=('!lto')
22 prepare() {
23   cd "$_pkgname-$pkgver"
24   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
27 build() {
28   cd "$_pkgname-$pkgver"
29   cargo build --release --frozen
32 check() {
33   cd "$_pkgname-$pkgver"
34   # https://github.com/kyoheiu/felix/issues/200
35   touch testfiles/permission_test
36   chmod 444 testfiles/permission_test
37   cargo test --frozen
40 package() {
41   cd "$_pkgname-$pkgver"
42   install -Dm 755 "target/release/fx" "$pkgdir/usr/bin/$_pkgname"
43   install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
44   install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
47 # vim: ts=2 sw=2 et: