summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d02c37da3688f537c31444efc94c7226a0d4f17 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Slavi Pantaleev <slavi at devture.com>

pkgname=sftpman-iced
epoch=1
pkgver=2.0.3
pkgrel=0
pkgdesc='A GUI frontend to sftpman (an application for managing and mounting sshfs (SFTP) filesystems)'
url='https://github.com/spantaleev/sftpman-iced-rs'
license=("AGPL-3.0-or-later")
makedepends=('git' 'cargo')
# sftpman-iced requires libsftpman, but pulls it via cargo.
# There's no runtime dependency on sftpman.
depends=('sshfs')
optdepends=('sftpman: CLI version')
replaces=('sftpman-gtk')
arch=('any')
install=$pkgname.install
source=("git+https://github.com/spantaleev/sftpman-iced-rs.git#tag=v$pkgver")
b2sums=('SKIP')

prepare() {
	cd "$srcdir/sftpman-iced-rs"
	export RUSTUP_TOOLCHAIN=stable
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd "$srcdir/sftpman-iced-rs"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --frozen --release
}

check() {
	cd "$srcdir/sftpman-iced-rs"
	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
	cd "$srcdir/sftpman-iced-rs"

	install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"

	install -Dm 644 etc/sftpman-iced.desktop $pkgdir/usr/share/applications/$pkgname.desktop
	install -Dm 644 assets/sftpman-iced-512.png $pkgdir/usr/share/pixmaps/$pkgname.png
}