%global debug_package %{nil} %global git_tag RELEASE.2024-12-18T13-15-44Z Name: minio Version: %(echo %{git_tag} | grep --only-matching --perl-regexp '\d{4}-\d{2}-\d{2}' | sed 's/-/./g') Release: 1%{?dist} Summary: A high-performance, S3 compatible object store. License: AGPL-3.0 URL: https://github.com/minio/minio Source0: https://github.com/minio/minio/archive/refs/tags/%{git_tag}.tar.gz Source1: %{name}.sysusers Source2: %{name}.service Source3: %{name}.config.yaml ExclusiveArch: x86_64 BuildRequires: systemd-rpm-macros BuildRequires: git BuildRequires: golang %{?systemd_requires} %{?sysusers_requires_compat} %description A high-performance, S3 compatible object store. %prep %autosetup -n %{name}-%{git_tag} %build CGO_ENABLED=0 go build -tags kqueue -trimpath \ --ldflags "-s -w -X github.com/minio/minio/cmd.Version=$(echo %{git_tag} | sed 's/^.*\.//')" \ -o minio %install install --mode=0755 -D minio %{buildroot}%{_bindir}/minio install --mode=0640 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/minio/config.yaml install --mode=0644 --preserve-timestamps -D %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf install --mode=0644 -D %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service install --mode=0750 --directory %{buildroot}%{_sharedstatedir}/minio %files %doc README.md %license LICENSE %{_bindir}/minio %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %defattr(-,minio,minio,-) %config %{_sysconfdir}/minio/config.yaml %dir %{_sharedstatedir}/minio %pre %sysusers_create_compat %{SOURCE1} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %changelog %autochangelog