summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 72d95266a2bdfaec2ab900647767733b02be9a68 (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
# Maintainer: fabillo <fabillo@archlinux.org>
pkgname="ripdrag-git"
pkgver=0.3.2.r3.c2e08a6
pkgrel=1
pkgdesc="Drag and drop files to and from the terminal"
arch=(x86_64)
url="https://github.com/nik012003/ripdrag"
license=('GPL3')
depends=('gtk4')
makedepends=('cargo' 'git')
provides=('ripdrag')
conflicts=('ripdrag')
source=("$pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$pkgname"
	git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
}

prepare() {
	cd "$pkgname"
	export RUSTUP_TOOLCHAIN=stable
	cargo fetch --target "$CARCH-unknown-linux-gnu"
}

build() {
	cd "$pkgname"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --release --frozen
}

check() {
	cd "$pkgname"
	./target/release/ripdrag -V
}

package() {
	cd "$pkgname"
	install -Dm755 "target/release/ripdrag" "$pkgdir/usr/bin/ripdrag"
}