Adapt the spec file to use the new style cmake macros
This commit is contained in:
parent
7121cf8098
commit
cf1c4f5ff4
33
eccodes.spec
33
eccodes.spec
@ -1,6 +1,6 @@
|
||||
Name: eccodes
|
||||
Version: 2.18.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: WMO data format decoding and encoding
|
||||
|
||||
# force the shared libraries to have these so versions
|
||||
@ -176,12 +176,12 @@ in C, and Fortran 90.
|
||||
%autosetup -n %{name}-%{version}-Source -p1
|
||||
|
||||
# unpack the test data below build
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir -p %{_vpath_builddir}
|
||||
pushd %{_vpath_builddir}
|
||||
tar xf %SOURCE1
|
||||
popd
|
||||
|
||||
# remove executable permissions from c files
|
||||
cd ..
|
||||
chmod 644 tigge/*.c
|
||||
chmod 644 tools/*.c
|
||||
|
||||
@ -189,7 +189,6 @@ chmod 644 tools/*.c
|
||||
chmod 644 AUTHORS LICENSE
|
||||
|
||||
%build
|
||||
cd build
|
||||
|
||||
#-- The following features are disabled by default and not switched on:
|
||||
#
|
||||
@ -244,19 +243,20 @@ cd build
|
||||
-DECCODES_SOVERSION=%{so_version} \
|
||||
-DECCODES_SOVERSION_F90=%{so_version_f90} \
|
||||
-DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" \
|
||||
-DENABLE_PYTHON=OFF \
|
||||
..
|
||||
-DENABLE_PYTHON=OFF
|
||||
|
||||
%make_build
|
||||
# note the final '..' is no longer needed to the cmake3 call.
|
||||
# this is now hidden in the %%cmake3 macro
|
||||
|
||||
%cmake_build
|
||||
|
||||
# copy some include files to the build dir
|
||||
# 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/
|
||||
# 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/
|
||||
|
||||
%install
|
||||
%make_install -C build
|
||||
%cmake_install
|
||||
mkdir -p %{buildroot}%{_fmoddir}
|
||||
mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}/
|
||||
|
||||
@ -307,7 +307,7 @@ sed -i 's|^libs=.*$|libs=-L${libdir} -leccodes_f90 -leccodes|g' %{buildroot}/%{_
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%check
|
||||
cd build
|
||||
cd %{_vpath_builddir}
|
||||
|
||||
# notes:
|
||||
# * the LD_LIBRARY_PATH setting is required to let the tests
|
||||
@ -317,6 +317,8 @@ cd build
|
||||
# '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} \
|
||||
@ -348,6 +350,9 @@ ctest3 -V %{?_smp_mflags}
|
||||
%doc %{_datadir}/doc/%{name}/
|
||||
|
||||
%changelog
|
||||
* Wed Aug 05 2020 Jos de Kloe <josdekloe@gmail.com> - 2.18.0-5
|
||||
- Adapt the spec file to use the new style cmake macros
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.0-4
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user