diff --git a/eccodes.spec b/eccodes.spec index e592ed4..3d8d0f9 100644 --- a/eccodes.spec +++ b/eccodes.spec @@ -174,12 +174,12 @@ in C, and Fortran 90. %autosetup -n %{name}-%{version}-Source -p1 # unpack the test data below build -mkdir -p %{_vpath_builddir} -pushd %{_vpath_builddir} +mkdir build +cd build tar xf %SOURCE1 -popd # remove executable permissions from c files +cd .. chmod 644 tigge/*.c chmod 644 tools/*.c @@ -187,6 +187,7 @@ chmod 644 tools/*.c chmod 644 AUTHORS LICENSE %build +cd build #-- The following features are disabled by default and not switched on: # @@ -230,11 +231,6 @@ chmod 644 AUTHORS LICENSE # export FCFLAGS="%%{build_fflags} -fallow-argument-mismatch" # defining the -DCMAKE_Fortran_FLAGS for camke is required to let it compile. -# added -DCMAKE_Fortran_FLAGS="-fPIC" -# because the koji build crashes with the error that it needs this setting -# when I try to build for armv7hl (other archs do not complain ......) -# I have no idea what causes this difference in behaviour. - %cmake3 -DINSTALL_LIB_DIR=%{_lib} \ -DENABLE_ECCODES_OMP_THREADS=ON \ -DENABLE_EXTRA_TESTS=ON \ @@ -246,7 +242,8 @@ chmod 644 AUTHORS LICENSE -DECCODES_SOVERSION=%{so_version} \ -DECCODES_SOVERSION_F90=%{so_version_f90} \ -DCMAKE_Fortran_FLAGS="-fPIC" \ - -DENABLE_PYTHON=OFF + -DENABLE_PYTHON=OFF \ + .. # not needed anymore (solved in the cmake file now) # -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" @@ -254,15 +251,16 @@ chmod 644 AUTHORS LICENSE # note the final '..' is no longer needed to the cmake3 call. # this is now hidden in the %%cmake3 macro -%cmake_build +%make_build # copy some include files to the build dir -# that are otherwise not found when creating the debugsource sub-package -cp fortran/eccodes_constants.h %{_vpath_builddir}/fortran/ -cp fortran/grib_api_constants.h %{_vpath_builddir}/fortran/ +# that are otherwise not found when creating the debugsource subpackage +cd .. +cp fortran/eccodes_constants.h build/fortran/ +cp fortran/grib_api_constants.h build/fortran/ %install -%cmake_install +%make_install -C build mkdir -p %{buildroot}%{_fmoddir} mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}/ @@ -313,7 +311,7 @@ sed -i 's|^libs=.*$|libs=-L${libdir} -leccodes_f90 -leccodes|g' %{buildroot}/%{_ %ldconfig_scriptlets %check -cd %{_vpath_builddir} +cd build # notes: # * the LD_LIBRARY_PATH setting is required to let the tests @@ -323,8 +321,6 @@ cd %{_vpath_builddir} # 'eccodes_t_bufr_dump_(de|en)code_C' tests run. # These tests compile on the fly generated C code, and # without this setting the loader does not find the libraries. -# * this is a 'non-standard' use of ctest3 so it does currently not -# work with the %%ctest macro. LD_LIBRARY_PATH=%{buildroot}/%{_libdir} \ LIBRARY_PATH=%{buildroot}/%{_libdir} \