summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTuhana GAYRETLÄ°2022-04-23 15:15:25 +0300
committerTuhana GAYRETLÄ°2022-04-23 15:15:25 +0300
commit4ae70fe8ea6d8f2fe8c60eea97e92047b141f288 (patch)
tree339b4e517bc1693ac75ce8e273f3a586dace45f7
downloadaur-4ae70fe8ea6d8f2fe8c60eea97e92047b141f288.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD42
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1f7df87f99a1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = treefetch-git
+ pkgdesc = A lightning-fast system fetch tool built with Rust - Git version
+ pkgver = v2.0.0.r22.b7e52ea
+ pkgrel = 1
+ url = https://github.com/angelofallars/treefetch
+ arch = x86_64
+ license = GPL3
+ makedepends = cargo
+ makedepends = git
+ provides = treefetch
+ conflicts = treefetch
+ source = git+https://github.com/angelofallars/treefetch.git
+ sha256sums = SKIP
+
+pkgname = treefetch-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9460ef6f903e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Tuhana GAYRETLÄ° <tuhana at tuta dot io>
+# shellcheck disable=SC2034,SC2148,SC2164,SC2154
+
+pkgname=treefetch-git
+_pkgname=${pkgname%-git}
+pkgver=v2.0.0.r22.b7e52ea
+pkgrel=1
+pkgdesc="A lightning-fast system fetch tool built with Rust - Git version"
+arch=(x86_64)
+url="https://github.com/angelofallars/treefetch"
+license=(GPL3)
+makedepends=(cargo git)
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("git+$url.git")
+sha256sums=(SKIP)
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+
+ printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+
+ install -Dm755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname"
+}