summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBao Trinh2022-10-20 05:53:27 -0500
committerBao Trinh2022-10-20 05:53:27 -0500
commitf1d03cfc2719d658e78bf28746c95928444615cf (patch)
tree65c6f5de21f9a5fb45e1981374f8ee6ceba5bcba
downloadaur-f1d03cfc2719d658e78bf28746c95928444615cf.tar.gz
initial build
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD39
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8d429f88cb34
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = btsdu-git
+ pkgdesc = Btrfs Snapshot Disk Usage Analyzer
+ pkgver = r7.a9e131c
+ pkgrel = 1
+ url = https://github.com/rkapl/btsdu
+ arch = x86_64
+ license = GPL2
+ makedepends = cargo
+ optdepends = ncdu: display results
+ provides = btsdu
+ conflicts = btsdu
+ source = btsdu-git::git+https://github.com/rkapl/btsdu
+ sha512sums = SKIP
+
+pkgname = btsdu-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..194f66e67eed
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Bao Trinh <qubidt@gmail.com>
+
+_pkgname=btsdu
+pkgname=${_pkgname}-git
+pkgver=r7.a9e131c
+pkgrel=1
+pkgdesc="Btrfs Snapshot Disk Usage Analyzer"
+arch=("x86_64")
+url="https://github.com/rkapl/btsdu"
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+license=('GPL2')
+makedepends=('cargo')
+optdepends=('ncdu: display results')
+source=("$pkgname::git+https://github.com/rkapl/btsdu")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ {
+ git describe --long 2>/dev/null ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ } | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$pkgname"
+ cargo build --release --all-features --target-dir=target
+}
+
+check() {
+ cd "$pkgname"
+ cargo test --release --locked --target-dir=target
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm755 "target/release/${_pkgname}" -t "${pkgdir}/usr/bin"
+}