summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a87f5904819a9407b31330c79c8a0ab52b6ac296 (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
48
49
50
# Maintainer: Martin Kühl <martin.kuehl@posteo.net>
_pkgname=xdg-terminal-exec
pkgname=xdg-terminal-exec-mkhl
pkgver=0.2.0
pkgrel=2
epoch=
pkgdesc="xdg-terminal-exec rewritten in rust"
arch=(i686 x86_64 armv6h armv7h)
url="https://codeberg.org/mkhl/xdg-terminal-exec/"
license=(GPL-3.0-only)
groups=()
depends=(glibc gcc-libs)
makedepends=(cargo)
checkdepends=()
optdepends=()
provides=(xdg-terminal-exec)
conflicts=(xdg-terminal-exec xdg-terminal-exec-git)
replaces=()
backup=()
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz::https://codeberg.org/mkhl/$_pkgname/archive/v$pkgver.tar.gz")
noextract=()
sha512sums=('928dd19a248eb1a7ce09effbccc472558854bc41e0c9a8040bf818c3c7129d4e360d8e4dc630bee294edf404b029cd1178a23847983aedb7751d9e36d6caf985')
validpgpkeys=()

prepare() {
	cd "$_pkgname"
	cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

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 -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}