## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without python Name: spglib Summary: C library for finding and handling crystal symmetries Version: 2.0.2 Release: %{autorelease} License: BSD URL: https://spglib.github.io/%{name}/ Source0: https://github.com/atztogo/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: spglib-unbundle_gtest.patch BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: gtest-devel %description C library for finding and handling crystal symmetries. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains libraries and header files for developing applications that use spglib. %package fortran Summary: Runtime files for %{name} Fortran bindings Requires: %{name}%{?_isa} = %{version}-%{release} Requires: gcc-gfortran%{?_isa} %description fortran This package contains runtime files to run applications that were built using %{name}'s Fortran bindings. %package fortran-devel Summary: Development files for %{name} with Fortran bindings Requires: %{name}-fortran%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description fortran-devel This package contains Fortran module and header files for developing Fortran applications that use %{name}. %if %{with python} %package -n python3-%{name} Summary: Python3 library of %{name} BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-pytest BuildRequires: python3-pyyaml %description -n python3-%{name} This package contains the libraries to develop applications with %{name} Python3 bindings. %endif %prep %autosetup -n %{name}-%{version} -p1 %if %{with python} %generate_buildrequires %pyproject_buildrequires -N python/requirements.txt %endif %build %cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH=include/%{name} \ -DSPGLIB_SHARED_LIBS=ON \ -DSPGLIB_WITH_Python=ON \ -DSPGLIB_WITH_TESTS=ON \ -DWITH_Fortran:BOOL=ON %cmake_build pushd test export CXXFLAGS="%{build_cxxflags} -Wl,--copy-dt-needed-entries" %cmake %cmake_build popd %if %{with python} pushd python %pyproject_wheel %endif %install %cmake_install # Remove static libraries rm -f $RPM_BUILD_ROOT%{_libdir}/*.a # Move fortran libraries mkdir -p $RPM_BUILD_ROOT%{_fmoddir} mv $RPM_BUILD_ROOT%{_libdir}/*.mod $RPM_BUILD_ROOT%{_fmoddir}/ %if %{with python} pushd python %pyproject_install %pyproject_save_files %{name} %endif %check pushd test %ctest popd %if %{with python} pushd python %pytest -v %endif %files %doc README.md %license COPYING %{_libdir}/libsymspg.so.1 %{_libdir}/libsymspg.so.2.0.2 %files devel %{_libdir}/libsymspg.so %dir %{_includedir}/%{name} %{_includedir}/%{name}/*.h %{_libdir}/pkgconfig/spglib.pc %files fortran %{_libdir}/libspglib_f08.so.1 %{_libdir}/libspglib_f08.so.2.0.2 %files fortran-devel %{_bindir}/spglib_example_fortran.X %{_libdir}/libspglib_f08.so %{_includedir}/%{name}/spglib_f08.f90 %{_fmoddir}/spglib_f08.mod %{_libdir}/pkgconfig/spglib_f08.pc %dir %{_includedir}/%{name} %if %{with python} %files -n python3-%{name} -f %{pyproject_files} %license COPYING %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-*.dist-info/ %endif %changelog * Mon May 15 2023 Antonio Trande 2.0.2-1 - Release 2.0.2 * Sat Jan 21 2023 Fedora Release Engineering 1.16.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering 1.16.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint 1.16.1-6 - Rebuilt for Python 3.11 * Sat Jan 22 2022 Fedora Release Engineering 1.16.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Dec 08 2021 Charalampos Stratakis 1.16.1-4 - Use pytest instead of the deprecated nose test runner * Fri Jul 23 2021 Fedora Release Engineering 1.16.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint 1.16.1-2 - Rebuilt for Python 3.10 * Sat Jan 30 2021 Antonio T 1.16.1-1 - Release 1.16.1 * Wed Jan 27 2021 Fedora Release Engineering 1.15.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Jan 08 2021 Tom Stellard 1.15.1-4 - Add BuildRequires: make * Wed Jul 29 2020 Fedora Release Engineering 1.15.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jul 24 2020 Jeff Law 1.15.1-2 - Use __cmake_in_source_build * Wed Jun 24 2020 sagitter 1.15.1-1 - Release 1.15.1| BuildRequires python3-setuptools explicitly * Tue May 26 2020 Miro Hrončok 1.14.1-3 - Rebuilt for Python 3.9 * Fri Jan 31 2020 Fedora Release Engineering 1.14.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jan 23 2020 sagitter 1.14.1-1 - Release 1.14.1 * Thu Oct 03 2019 Miro Hrončok 1.11.1-5 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok 1.11.1-4 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering 1.11.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Feb 03 2019 Fedora Release Engineering 1.11.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Nov 20 2018 sagitter 1.11.1-1 - Update to 1.11.1 * Sat Jul 14 2018 Fedora Release Engineering 1.10.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok 1.10.3-2 - Rebuilt for Python 3.7 * Thu Feb 22 2018 sagitter 1.10.3-1 - Update to 1.10.3 * Sat Feb 17 2018 sagitter 1.10.2-3 - Use %%%%ldconfig_scriptlets * Fri Feb 09 2018 Fedora Release Engineering 1.10.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Dec 14 2017 sagitter 1.10.2-1 - Update to 1.10.2 * Fri Dec 08 2017 sagitter 1.10.1-2 - Fix upstream bug #41 * Thu Nov 23 2017 sagitter 1.10.1-1 - Update to 1.10.1 * Thu Aug 03 2017 Fedora Release Engineering 1.9.9-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering 1.9.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jul 03 2017 sagitter 1.9.9-3 - Modified for epel builds * Sun Mar 26 2017 sagitter 1.9.9-2 - Update to git commit #825e80 * Fri Mar 17 2017 sagitter 1.9.9-1 - New package (bz#1431443)