%define name ncdu %define version 2.7 %define release 1%{?dist} Summary: Text-based disk usage viewer Name: %{name} Version: %{version} Release: %{release} License: MIT License URL: https://dev.yorhel.nl/ncdu Source0: https://dev.yorhel.nl/download/%{name}-%{version}.tar.gz %define debug_package %{nil} %define arch_name %{_arch} BuildRequires: wget BuildRequires: gcc BuildRequires: ncurses-devel BuildRequires: make BuildRequires: gzip BuildRequires: upx BuildRequires: libzstd-devel %description ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du', and provides a fast way to see what directories are using your disk space. %prep %setup -q %build wget https://ziglang.org/download/0.13.0/zig-linux-%{_arch}-0.13.0.tar.xz mkdir -p $HOME/zig tar -xf zig-linux-%{_arch}-0.13.0.tar.xz -C $HOME/zig/ export PATH="$PATH:$HOME/zig/zig-linux-%{_arch}-0.13.0" %ifarch x86_64 zig build --release=fast -Dcpu=%{_arch} -Dpie=true %else make %endif strip --strip-all zig-out/bin/%{name} upx zig-out/bin/%{name} gzip %{name}.1 %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 install -m 755 zig-out/bin/%{name} %{buildroot}%{_bindir} install -m 644 %{name}.1.gz %{buildroot}%{_mandir}/man1/ %files %license LICENSES/MIT.txt %doc README.md ChangeLog %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.gz %changelog * Wed Nov 27 2024 Danie de Jager - 2.7-1 * Fri Oct 25 2024 Danie de Jager - 2.6-1 * Fri Jul 26 2024 Danie de Jager - 2.5-1 * Sun Apr 21 2024 Danie de Jager - 2.4-1 * Wed Feb 21 2024 Danie de Jager - 2.3-1 - Initial RPM build