From f01ff77afb06007cfc35c6004ac1f7cba723fa1e Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 23 May 2025 08:51:00 -0700 Subject: [PATCH] add: btdu (#4709) (#5002) * add: btdu * pretend to be c * Update btdu.spec * Update btdu.spec * Update btdu.spec --------- (cherry picked from commit b367dc15e5da330d0ebd53bac3bc32669920946a) Signed-off-by: madomado Co-authored-by: madomado --- anda/langs/d/btdu/anda.hcl | 5 +++++ anda/langs/d/btdu/btdu.spec | 40 +++++++++++++++++++++++++++++++++++ anda/langs/d/btdu/update.rhai | 1 + 3 files changed, 46 insertions(+) create mode 100644 anda/langs/d/btdu/anda.hcl create mode 100644 anda/langs/d/btdu/btdu.spec create mode 100644 anda/langs/d/btdu/update.rhai diff --git a/anda/langs/d/btdu/anda.hcl b/anda/langs/d/btdu/anda.hcl new file mode 100644 index 0000000000..0c2f5d88d5 --- /dev/null +++ b/anda/langs/d/btdu/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "btdu.spec" + } +} diff --git a/anda/langs/d/btdu/btdu.spec b/anda/langs/d/btdu/btdu.spec new file mode 100644 index 0000000000..3df7e69e0f --- /dev/null +++ b/anda/langs/d/btdu/btdu.spec @@ -0,0 +1,40 @@ +%define debug_package %nil + +Name: btdu +Version: 0.6.0 +Release: 1%?dist +Summary: Sampling disk usage profiler for btrfs +License: GPL-2.0-only +URL: https://github.com/CyberShadow/btdu +Source0: %url/archive/refs/tags/v%version.tar.gz +# gcc-gdc is built using ldc ironically +# let's just use ldc instead, they have the funny macros +BuildRequires: dub ldc mold +BuildRequires: pkgconfig(ncurses) +ExclusiveArch: %ldc_arches + +%description +%summary. + +%prep +%autosetup + +%build +# see macro _d_optflags +# got rid of -release +export DFLAGS="-O -gc -wi --linker=mold" +dub build -b release --parallel -n -y --compiler=ldmd2 # release-debug doesn't work + +%install +install -Dpm755 btdu -t %buildroot%_bindir +install -Dpm644 btdu.1 -t %buildroot%_mandir/man1 + +%files +%doc README.md +%license COPYING +%_bindir/btdu +%_mandir/man1/btdu.1.gz + +%changelog +* Sun May 05 2024 madonuko - 0.5-1 +- Initial package. diff --git a/anda/langs/d/btdu/update.rhai b/anda/langs/d/btdu/update.rhai new file mode 100644 index 0000000000..1689fa4601 --- /dev/null +++ b/anda/langs/d/btdu/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("CyberShadow/btdu"));