%global debug_package %{nil} %global __requires_exclude_from ^.*\.fish$ Name: spack Summary: A flexible package manager Version: 0.15.4 Release: %mkrel 4 License: MIT URL: https://spack.io/ Source0: https://github.com/spack/spack/releases/download/v%{version}/spack-%{version}.tar.gz Patch0: find-path-prefix.patch Group: System/Packaging BuildRequires: python3 Requires(pre): shadow-utils Requires: curl Requires: tar Requires: make Requires: glibc-static-devel Requires: glibc-devel Requires: fish Requires: patch Requires: zip Requires: gcc-gfortran Requires: gcc-c++ Requires: libstdc++-static-devel Requires: cmake Requires: tar Requires: gzip Requires: bzip2 BuildArch: noarch Recommends: spack-repos %description Spack is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. Spack isn’t tied to a particular language; you can build a software stack in Python or R, link to libraries written in C, C++, or Fortran, and easily swap compilers or target specific microarchitectures. %package docs Summary: A flexible package manager Group: Documentation %description docs Documentation for spack. %package repos Summary: A flexible package manager Group: System/Packaging %description repos Repository for spack. %prep %autosetup -p1 spack-%{version} %build %install mkdir -p %{buildroot}%{_prefix} cp -r lib %{buildroot}%{_prefix}/lib mkdir -p %{buildroot}%{_bindir} cp -r bin/* %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir} cp -r share/* %{buildroot}%{_datadir} cp -r etc %{buildroot} cp -r var %{buildroot} mkdir -p %{buildroot}/opt/spack mkdir -p %{buildroot}/%{_var}/spack/cache %pre getent group spack >/dev/null || groupadd -r spack getent passwd spack >/dev/null || \ useradd -c "Spack package manager" -g spack -d %{_localstatedir}/lib/spack -M -r -s /sbin/nologin spack mkdir -p /opt/spack chown spack:spack /opt/spack chmod ug+rwx /opt/spack exit 0 %files %attr(0775,spack,spack) %{_prefix}/lib/spack %attr(0775,spack,spack) %{_datadir}/spack %{_sysconfdir}/spack %{_bindir}/sbang %{_bindir}/spack %{_bindir}/spack-python %attr(0775,spack,spack) %{_var}/spack %dir %attr(0775,spack,spack) %{_var}/spack/cache %exclude %{_prefix}/lib/spack/docs %exclude %{_prefix}/lib/spack/spack/test %dir %{_var}/spack/repos %exclude %{_var}/spack/repos/* %files docs %{_prefix}/lib/spack/docs %{_prefix}/lib/spack/spack/test %files repos %{_var}/spack/repos/*