## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 %global forgeurl0 https://gitlab.com/QEF/q-e %global version0 7.5 %global tag0 qe-%{version0} # Cannot de-bundle devicexlib. The project doesn't build properly and qe uses version 0.1 # https://gitlab.com/max-centre/components/devicexlib/-/issues/20 %global forgeurl1 https://gitlab.com/max-centre/components/devicexlib %global commit1 a6b89ef77b1ceda48e967921f1f5488d2df9226d # Waiting on wannier90 4.0.0 and q-e to adapt to it %global forgeurl2 https://github.com/wannier-developers/wannier90 %global commit2 1d6b187374a2d50b509e5e79e2cab01a79ff7ce1 # Disabling tests for now # TODO: Investigate why the tests are taking so long to finish on x86_64 %bcond check 0 Name: quantum-espresso # This weird form is to avoid the verbose expansion when we are using a versioned tag instead of a commit snapshot Release: %autorelease %forgemeta -a Version: %[ %{defined tag0} ? "%version0" : "%forgeversion" ] Summary: A suite for electronic-structure calculations and materials modeling # Results are incorrect for s390x, upstream does not support this architecture ExcludeArch: %{ix86} s390x # See bundling discussion in https://gitlab.com/QEF/q-e/-/issues/366 Provides: bundled(FoXlibf) Provides: bundled(deviceXlib) # Automatically converted from old format: GPLv2+ - review is highly recommended. # TODO: Do a proper license re-review. Many are only SourceLicense, others are bundled License: %{shrink: GPL-2.0-or-later } # BSD: PP/src/bgw2pw.f90 # BSD: PP/src/pw2bgw.f90 # LGPLv2+: Modules/bspline.f90 # MIT: install/install-sh # zlib/libpng: clib/md5.c # zlib/libpng: clib/md5.h URL: http://www.quantum-espresso.org/ Source0: %{forgesource0} # Pseudopotentials used for tests # Currently these are retrieved by running the ctest with network enabled and archiving pseudo/ directory # Download issue: https://gitlab.com/QEF/q-e/-/issues/750 # License issue: https://gitlab.com/QEF/q-e/-/issues/751 Source1: pseudo.tar.gz Source2: %{forgesource1} Source3: %{forgesource2} # Allow building without git Patch: https://gitlab.com/QEF/q-e/-/merge_requests/2561.patch # Make sure internal libraries are built as static Patch: https://gitlab.com/QEF/q-e/-/merge_requests/2792.patch # Build system BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-gfortran # Project dependencies BuildRequires: fftw3-devel BuildRequires: flexiblas-devel # MPI variants BuildRequires: openmpi-devel BuildRequires: scalapack-openmpi-devel BuildRequires: mpich-devel BuildRequires: scalapack-mpich-devel BuildRequires: libmbd-devel BuildRequires: libmbd-openmpi-devel BuildRequires: libmbd-mpich-devel # Testuite dependenceis BuildRequires: python3 # To review #BuildRequires: python3-numpy %global _description %{expand: QUANTUM ESPRESSO is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.} %global _description_devel %{expand: Development files for %{name} package} %description %{_description} Serial version. %package openmpi Summary: %{name} - openmpi version %description openmpi %{_description} OpenMPI version. %package mpich Summary: %{name} - mpich version %description mpich %{_description} MPICH version. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{_description_devel} Serial version. %package openmpi-devel Summary: Development files for %{name} - openmpi version Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel %{_description_devel} OpenMPI version. %package mpich-devel Summary: Development files for %{name} - mpich version Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel %{_description_devel} MPICH version. %prep %forgeautosetup -p1 tar -xf %{SOURCE2} --strip-components=1 -C external/devxlib tar -xf %{SOURCE3} --strip-components=1 -C external/wannier90 # Set unique build directories for each serial/mpi variant # $MPI_SUFFIX will be evaluated in the loops below, set by mpi modules %global _vpath_builddir %{_vendor}-%{_target_os}-build${MPI_SUFFIX:-_serial} %conf # Temporary fix to the "executable .note.GNU-stack section" issue export LDFLAGS="$LDFLAGS -z noexecstack" cmake_common_args=( "-G Ninja" "-DQE_ENABLE_TEST:BOOL=ON" "-DQE_MBD_INTERNAL:BOOL=OFF" "-DQE_FFTW_VENDOR:STRING=FFTW3" "-DQE_ENABLE_OPENMP:BOOL=ON" "-DQE_ENABLE_DOC:BOOL=OFF" # Disable many external package support for now "-DQE_ENABLE_PLUGINS:STRING=''" "-DQE_ENABLE_FOX=OFF" "-DQE_ENABLE_ENVIRON=OFF" # TODO: review other flags ) for mpi in '' mpich openmpi; do if [ -n "$mpi" ]; then module load mpi/${mpi}-%{_arch} cmake_mpi_args=( "-DQE_ENABLE_MPI:BOOL=ON" "-DCMAKE_INSTALL_PREFIX:PATH=${MPI_HOME}" "-DQE_INSTALL_Fortran_MODULES:PATH=${MPI_FORTRAN_MOD_DIR}" "-DCMAKE_INSTALL_LIBDIR:PATH=lib" ) else cmake_mpi_args=( "-DQE_ENABLE_MPI:BOOL=OFF" "-DQE_INSTALL_Fortran_MODULES:PATH=%{_fmoddir}" ) fi %cmake \ ${cmake_common_args[@]} \ ${cmake_mpi_args[@]} [ -n "$mpi" ] && module unload mpi/${mpi}-%{_arch} done %build for mpi in '' mpich openmpi; do [ -n "$mpi" ] && module load mpi/${mpi}-%{_arch} %cmake_build [ -n "$mpi" ] && module unload mpi/${mpi}-%{_arch} done %install for mpi in '' mpich openmpi; do [ -n "$mpi" ] && module load mpi/${mpi}-%{_arch} %cmake_install [ -n "$mpi" ] && module unload mpi/${mpi}-%{_arch} done # Deduplicate python files rm -r %{buildroot}%{_libdir}/openmpi/bin/epw_pp.py rm -r %{buildroot}%{_libdir}/mpich/bin/epw_pp.py # Drop share/GUI: That thing is not packaged according to guidelines rm -r %{buildroot}%{_datadir}/GUI rm -r %{buildroot}%{_libdir}/openmpi/share/GUI rm -r %{buildroot}%{_libdir}/mpich/share/GUI %check %if %{with check} tar -xf %{SOURCE1} # Some tests could require more cpu slots than available on the builder # Make sure mpi variants run oversubscribed export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe CTEST_ARGS="" # Skip pw_plugins: Seems the associated tests were not added CTEST_ARGS="$CTEST_ARGS -LE pw_plugins" for mpi in '' mpich openmpi; do [ -n "$mpi" ] && module load mpi/${mpi}-%{_arch} %ctest $CTEST_ARGS [ -n "$mpi" ] && module unload mpi/${mpi}-%{_arch} done %endif %files %license License %{_bindir}/*.x %{_bindir}/epw_pp.py %{_libdir}/*.so.* %files openmpi %license License %{_libdir}/openmpi/bin/*.x %{_libdir}/openmpi/lib/*.so.* %files mpich %license License %{_libdir}/mpich/bin/*.x %{_libdir}/mpich/lib/*.so.* %files devel %{_includedir}/qe %{_fmoddir}/qe %{_libdir}/*.so %{_libdir}/cmake %{_libdir}/pkgconfig %files openmpi-devel %{_libdir}/openmpi/lib/*.so %{_libdir}/openmpi/lib/cmake %{_libdir}/openmpi/lib/pkgconfig %{_fmoddir}/openmpi/qe %{_libdir}/openmpi/include/qe %files mpich-devel %{_libdir}/mpich/lib/*.so %{_libdir}/mpich/lib/cmake %{_libdir}/mpich/lib/pkgconfig %{_fmoddir}/mpich/qe %{_libdir}/mpich/include/qe %changelog ## START: Generated by rpmautospec * Thu Jul 16 2026 Fedora Release Engineering - 7.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Mon Mar 09 2026 Cristian Le - 7.5-2 - Fix linkage to internal libraries (rhbz#2445255) * Thu Mar 05 2026 Cristian Le - 7.5-1 - Update to 7.5 (rhbz#2093576,rhbz#2341257,rhbz#2350099) - Reworked most of the packaging - Use CMake build system - Use %%forgemeta macros - Added devel packages - Debundled what could be debundled and commented on the rest * Sat Jan 17 2026 Fedora Release Engineering - 7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Fri Jul 25 2025 Fedora Release Engineering - 7.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sat Jan 18 2025 Fedora Release Engineering - 7.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Fri Aug 02 2024 Marcin Dulak - 7.0-12 - Fix python ModuleNotFoundError testcode2 import bug #2301229 * Fri Jul 26 2024 Miroslav Suchý - 7.0-11 - convert license to SPDX * Fri Jul 19 2024 Fedora Release Engineering - 7.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Jan 30 2024 Marcin Dulak - 7.0-9 - Remove support for i686 due to openmpi removal * Fri Jan 26 2024 Fedora Release Engineering - 7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 7.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 7.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jan 20 2023 Fedora Release Engineering - 7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering - 7.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Sun Jan 30 2022 Marcin Dulak - 7.0-3 - Fix "relocation R_X86_64_32 against .rodata" by passing -fPIE to FOXFLAGS - Workaround for segmentation fault with gfortran-12 -fno-lto, bug #2046933 * Fri Jan 21 2022 Fedora Release Engineering - 7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Dec 24 2021 Marcin Dulak - 7.0-1 - New upstream release * Fri Aug 06 2021 Marcin Dulak - 6.8-1 - New upstream release - Change changelog email - Bundle gitlab.com/max-centre/components/devicexlib - Remove no longer needed DEXX - Remove no longer needed iotk - Remove missing --with-elpa=no - Export environment variables before configure - Disable epel7 due to unsupported gfortran < 4.9 - export FLEXIBLAS=openblas-serial using a wrapper - Remove empty devel and static packages * Wed Jan 27 2021 Fedora Release Engineering - 6.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Aug 28 2020 Iñaki Úcar - 6.5-4 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager * Wed Jul 29 2020 Fedora Release Engineering - 6.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Mar 02 2020 Marcin Dulak - 6.5-2 - python and numpy br for epel8 * Fri Feb 14 2020 Marcin Dulak - 6.5-1 - new upstream release - -fallow-argument-mismatch fix for gfortran 10 - fix serial and parallel test-suite build (use 1 and 2 processors respectively) * Thu Jan 30 2020 Fedora Release Engineering - 6.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jul 26 2019 Fedora Release Engineering - 6.4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri May 17 2019 Marcin Dulak - 6.4.1-1 - new upstream release - kill hanging tests after timeout - disable failed architectures: configure fails to find openblas, fftw on other %%{openblas_arches} than x86_64 %%{ix86} * Thu Feb 14 2019 Orion Poplawski - 5.4.0-20 - Rebuild for openmpi 3.1.3 * Sat Feb 02 2019 Fedora Release Engineering - 5.4.0-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 5.4.0-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed May 02 2018 Iryna Shcherbina - 5.4.0-17 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Wed Mar 07 2018 Adam Williamson - 5.4.0-16 - Rebuild to fix GCC 8 mis-compilation See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64") * Fri Feb 09 2018 Fedora Release Engineering - 5.4.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 5.4.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 5.4.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 5.4.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Fri Oct 21 2016 Orion Poplawski - 5.4.0-11 - Rebuild for openmpi 2.0 * Fri Sep 16 2016 Marcin Dulak - 5.4.0-10 - upsteam update - speedup the tests by running on single core so koji %%{arm} builds finish within the timeout (bug #1356620) - get rid of D__XLF and D__LINUX_ESSL on ppc64 * Tue Sep 6 2016 Peter Robinson 5.3.0-9 - Sync openblas ExclusiveArch * Thu Feb 18 2016 Marcin Dulak - 5.3.0-8 - use only 2 cores for tests (bug #1308481) - defattr removed * Sat Feb 13 2016 Marcin Dulak - 5.3.0-7 - explicit Requires are needed for scalapack, blacs on el6 (bug #1301922) * Thu Feb 04 2016 Fedora Release Engineering - 5.3.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Jan 12 2016 Marcin Dulak 5.3.0-5 - upsteam update - switch to test-suite - no more upftools? * Mon Jan 4 2016 Marcin Dulak 5.2.1-4 - disable compilation warnings - use lua for copying pseudos - removed common package * Sat Dec 19 2015 Marcin Dulak 5.2.1-3 - fix ExclusiveArch - license is GPLv2+ - OMP_NUM_THREADS removed - use %%{optflags} * Fri Dec 18 2015 Dave Love - 5.2.1-2 - Require %%{name}-common, not %%{name}-common%%{?_isa} * Wed Dec 16 2015 Marcin Dulak 5.1.2-1 - initial build ## END: Generated by rpmautospec