# source code found at https://github.com/minio/minio %define procs $(((%getncpus)*2)) %define username minio-user %define debug_package %{nil} Name: minio Summary: High-performance server with S3 compatible object storage Release: 1 Version: 20250403145628.0.0 License: AGPLv3 Provides: minio Packager: Logan URL: https://min.io Source0: %{name}-v%{version}.tar.xz BuildRequires: golang-go git %description MinIO offers high-performance, S3 compatible object storage. Minio may be run standalone or natively in Kubernetes. %prep %setup -q %build %make_build -j%{procs} %install %__install -dm 755 %{buildroot}%{_bindir} %__install -dm 755 %{buildroot}%{_localstatedir}/%{name}/data %__install -D -m 755 %{name} %{buildroot}%{_bindir}/%{name} %__install -dm 755 %{buildroot}/lib/systemd/system/ %__install -D -m 644 install/%{name}/lib/systemd/system/%{name}.service %{buildroot}/lib/systemd/system/%{name}.service %__install -dm 755 %{buildroot}%{_sysconfdir}/default/ %__install -D -m 644 install/%{name}%{_sysconfdir}/default/%{name} %{buildroot}%{_sysconfdir}/default/%{name} %clean %__rm -r %{buildroot} %pre [[ ! $(id -u %{username} 2> /dev/null) ]] && useradd -M -r -U "%{username}" %files %defattr(-,root,root) %{_bindir}/%{name} /lib/systemd/system/%{name}.service %{_sysconfdir}/default/%{name} %post %__chown -R %{username}:%{username} "%{_localstatedir}/%{name}" %__chmod -R 755 %{_localstatedir}/%{name} echo "Minio installed: see config file at '%{_sysconfdir}/default/%{name}' to set user login and for path to install TLS certificates. TLS is inactive by default."