-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPKGBUILD
More file actions
44 lines (38 loc) · 1.03 KB
/
PKGBUILD
File metadata and controls
44 lines (38 loc) · 1.03 KB
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
# Maintainer: xscriptor <x@xscriptor.com>
pkgname=xtop-git
_pkgname=xtop
pkgver=r7.37fae84
pkgrel=1
pkgdesc="A btop-like system monitor written in Rust for X"
arch=('x86_64')
url="https://github.com/xscriptor/xtop"
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'cargo')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
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
}
package() {
cd "$_pkgname"
# Instalar binario
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
# Instalar licencia y readme
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$_pkgname/README.md"
}