The package rpms/eccodes.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/eccodes.git/commit/?id=ebe8fef465....
Change:
+ExcludeArch: armv7hl
Thanks.
Full change:
============
commit ebe8fef4650fb0ad2d3234e35490cdc217be239e
Author: Jos de Kloe <josdekloe(a)gmail.com>
Date: Thu Mar 29 16:16:01 2018 +0200
added ExcludeArch to suppress failing builds on some architectures
diff --git a/eccodes.spec b/eccodes.spec
index e93edbf..0ccf629 100644
--- a/eccodes.spec
+++ b/eccodes.spec
@@ -1,6 +1,6 @@
Name: eccodes
Version: 2.7.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: WMO data format decoding and encoding
# force the shared libraries to have these so versions
@@ -95,6 +95,15 @@ Requires: %{name}-data = %{version}-%{release}
Obsoletes: grib_api < %{final_grib_api_version}
+# as explained in bugzilla #1562066
+ExcludeArch: i686
+# as explained in bugzilla #1562071
+ExcludeArch: ppc64
+# as explained in bugzilla #1562076
+ExcludeArch: s390x
+# as explained in bugzilla #1562084
+ExcludeArch: armv7hl
+
%description
ecCodes is a package developed by ECMWF which provides an application
programming interface and a set of tools for decoding and encoding messages
@@ -336,6 +345,9 @@ ctest -V %{?_smp_mflags}
%doc %{_datadir}/doc/%{name}/
%changelog
+* Thu Mar 29 2018 Jos de Kloe <josdekloe(a)gmail.com> - 2.7.0-2
+- added ExcludeArch statements for the failing architectures
+
* Thu Mar 22 2018 Jos de Kloe <josdekloe(a)gmail.com> - 2.7.0-1
- Upgrade to version 2.7.0
- Fix rpath and some permission issues
commit 82da9bccd710bae40ac7c97c63c9a548c7fe91ff
Author: Jos de Kloe <josdekloe(a)gmail.com>
Date: Thu Mar 22 11:55:12 2018 +0100
add source tar file again, since it seemed lost when committing the test data tar
file.
diff --git a/sources b/sources
index 8b2fcfc..27a0e6e 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
+SHA512 (eccodes-2.7.0-Source.tar.gz) =
6b65902e0e82a038e6c705c68a5947ceef4f6950d83bdfcc78ec83b60bdcbc2b56a62971c5aa40c91b749c224ffa8ef120e9b72bf168032ffef9096207234103
SHA512 (eccodes_test_data.tar.gz) =
b0baa0867ac583ec9000e21b2653d11c26333a50bb817a41cad0ebc30b445fc9295f7b5cbc6908364aed502bfc4786929f2dcd0526b6540b26c1c024c90ede6a
commit 7f9a70b452b5f37713cd26607131e8b4e408e821
Author: Jos de Kloe <josdekloe(a)gmail.com>
Date: Thu Mar 22 11:29:01 2018 +0100
import test data tar file
diff --git a/.gitignore b/.gitignore
index 7f8f7a0..d15f2b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/eccodes-2.7.0-Source.tar.gz
+/eccodes_test_data.tar.gz
diff --git a/sources b/sources
index 25e3309..8b2fcfc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (eccodes-2.7.0-Source.tar.gz) =
6b65902e0e82a038e6c705c68a5947ceef4f6950d83bdfcc78ec83b60bdcbc2b56a62971c5aa40c91b749c224ffa8ef120e9b72bf168032ffef9096207234103
+SHA512 (eccodes_test_data.tar.gz) =
b0baa0867ac583ec9000e21b2653d11c26333a50bb817a41cad0ebc30b445fc9295f7b5cbc6908364aed502bfc4786929f2dcd0526b6540b26c1c024c90ede6a
commit 58f6bde3c3d75d354776f33fbc67d80a563f83b5
Author: Jos de Kloe <josdekloe(a)gmail.com>
Date: Thu Mar 22 11:05:28 2018 +0100
add source tar file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7f8f7a0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/eccodes-2.7.0-Source.tar.gz
diff --git a/sources b/sources
new file mode 100644
index 0000000..25e3309
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (eccodes-2.7.0-Source.tar.gz) =
6b65902e0e82a038e6c705c68a5947ceef4f6950d83bdfcc78ec83b60bdcbc2b56a62971c5aa40c91b749c224ffa8ef120e9b72bf168032ffef9096207234103
commit d760bc31421a9b14896901d4a49916c994a02452
Author: Jos de Kloe <josdekloe(a)gmail.com>
Date: Thu Mar 22 10:56:46 2018 +0100
import spec file and patches
diff --git a/eccodes-32bit.patch b/eccodes-32bit.patch
new file mode 100644
index 0000000..dbf5d56
--- /dev/null
+++ b/eccodes-32bit.patch
@@ -0,0 +1,32 @@
+--- eccodes-2.7.0-Source.orig/src/grib_api_prototypes.h 2018-03-02 10:52:20.000000000
+0100
++++ eccodes-2.7.0-Source/src/grib_api_prototypes.h 2018-03-10 10:03:31.661896844 +0100
+@@ -868,8 +868,8 @@ double grib_ieeefloat_error(double x);
+ double grib_long_to_ieee(unsigned long x);
+ int grib_nearest_smaller_ieee_float(double a, double *x);
+ unsigned long grib_ieee_to_long(double x);
+-unsigned long grib_ieee64_to_long(double x);
+-double grib_long_to_ieee64(unsigned long x);
++uint64_t grib_ieee64_to_long(double x);
++double grib_long_to_ieee64(uint64_t x);
+ int grib_ieee_decode_array(grib_context *c, unsigned char *buf, size_t nvals, int bytes,
double *val);
+ int grib_ieee_decode_array(grib_context *c, unsigned char *buf, size_t nvals, int bytes,
double *val);
+ int grib_ieee_encode_array(grib_context *c, double *val, size_t nvals, int bytes,
unsigned char *buf);
+--- eccodes-2.7.0-Source.orig/src/grib_ieeefloat.c 2018-03-02 10:52:20.000000000 +0100
++++ eccodes-2.7.0-Source/src/grib_ieeefloat.c 2018-03-10 10:12:28.773274523 +0100
+@@ -392,14 +392,14 @@ unsigned long grib_ieee_to_long(double x
+ * grib_encode_unsigned_long.
+ */
+
+-unsigned long grib_ieee64_to_long(double x)
++uint64_t grib_ieee64_to_long(double x)
+ {
+ unsigned long lval;
+ memcpy(&lval,&x,8);
+ return lval;
+ }
+
+-double grib_long_to_ieee64 (unsigned long x)
++double grib_long_to_ieee64(uint64_t x)
+ {
+ double dval;
+ memcpy(&dval,&x,8);
diff --git a/eccodes-fortran-check.patch b/eccodes-fortran-check.patch
new file mode 100644
index 0000000..96ff5e4
--- /dev/null
+++ b/eccodes-fortran-check.patch
@@ -0,0 +1,20 @@
+--- eccodes-2.7.0-Source.orig/tests/bufr_dump_encode_fortran.sh 2018-03-02
10:52:20.000000000 +0100
++++ eccodes-2.7.0-Source/tests/bufr_dump_encode_fortran.sh 2018-03-10 10:16:43.857822252
+0100
+@@ -41,6 +41,7 @@ if command -v pkg-config >/dev/null 2>&1
+ INSTALL_DIR=`grep -w CMAKE_INSTALL_PREFIX $CACHE_FILE | cut -d'=' -f2`
+ FLAGS_LINKER=`echo $FLAGS_LINKER | sed -e "s:$INSTALL_DIR:$BUILD_DIR:g"`
+ FLAGS_COMPILER=`echo $FLAGS_COMPILER | sed -e
"s:$INSTALL_DIR:$BUILD_DIR:g"`
++ FLAGS_COMPILER="${FLAGS_COMPILER} -I${BUILD_DIR}/include"
+
+ # TODO: For now only support when shared libs enabled
+ SHARED_LIBS=`grep -w BUILD_SHARED_LIBS $CACHE_FILE | cut -d'=' -f2`
+--- eccodes-2.7.0-Source.orig/tests/bufr_dump_decode_fortran.sh 2018-03-02
10:52:20.000000000 +0100
++++ eccodes-2.7.0-Source/tests/bufr_dump_decode_fortran.sh 2018-03-10 10:16:43.857822252
+0100
+@@ -41,6 +41,7 @@ if command -v pkg-config >/dev/null 2>&1
+ INSTALL_DIR=`grep -w CMAKE_INSTALL_PREFIX $CACHE_FILE | cut -d'=' -f2`
+ FLAGS_LINKER=`echo $FLAGS_LINKER | sed -e "s:$INSTALL_DIR:$BUILD_DIR:g"`
+ FLAGS_COMPILER=`echo $FLAGS_COMPILER | sed -e
"s:$INSTALL_DIR:$BUILD_DIR:g"`
++ FLAGS_COMPILER="${FLAGS_COMPILER} -I${BUILD_DIR}/include"
+
+ # TODO: For now only support when shared libs enabled
+ SHARED_LIBS=`grep -w BUILD_SHARED_LIBS $CACHE_FILE | cut -d'=' -f2`
diff --git a/eccodes-rpath.patch b/eccodes-rpath.patch
new file mode 100644
index 0000000..c459067
--- /dev/null
+++ b/eccodes-rpath.patch
@@ -0,0 +1,13 @@
+--- eccodes-2.7.0-Source.orig/cmake/pkg-config.pc.in 2018-03-02 10:52:15.000000000 +0100
++++ eccodes-2.7.0-Source/cmake/pkg-config.pc.in 2018-03-10 10:16:43.852822378 +0100
+@@ -14,9 +14,7 @@ CC=@CMAKE_C_COMPILER@
+ CXX=@CMAKE_CXX_COMPILER@
+ FC=@CMAKE_Fortran_COMPILER@
+
+-rpath=@RPATH_FLAG@${libdir}
+-
+-libs=-L${libdir} ${rpath} @PKGCONFIG_LIBS@
++libs=-L${libdir} @PKGCONFIG_LIBS@
+
+ libs_private=@PKGCONFIG_LIBS_PRIVATE@
+
diff --git a/eccodes-soversion.patch b/eccodes-soversion.patch
new file mode 100644
index 0000000..e91210e
--- /dev/null
+++ b/eccodes-soversion.patch
@@ -0,0 +1,25 @@
+--- eccodes-2.7.0-Source.orig/fortran/CMakeLists.txt 2018-03-02 10:52:20.000000000 +0100
++++ eccodes-2.7.0-Source/fortran/CMakeLists.txt 2018-03-10 10:16:43.847822505 +0100
+@@ -43,7 +43,8 @@ if( HAVE_FORTRAN )
+ ecbuild_add_library( TARGET eccodes_f90
+ SOURCES grib_fortran.c grib_f90.f90 eccodes_f90.f90
grib_kinds.h
+ GENERATED grib_f90.f90 eccodes_f90.f90
+- LIBS eccodes )
++ LIBS eccodes
++ SOVERSION ${ECCODES_SOVERSION_F90})
+ add_custom_command( TARGET eccodes_f90 POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/include
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/eccodes.mod
${CMAKE_BINARY_DIR}/include
+--- eccodes-2.7.0-Source.orig/src/CMakeLists.txt 2018-03-02 10:52:20.000000000 +0100
++++ eccodes-2.7.0-Source/src/CMakeLists.txt 2018-03-10 10:16:43.848822480 +0100
+@@ -435,8 +435,8 @@ ecbuild_add_library(TARGET eccodes
+ ${grib_api_srcs}
+ GENERATED grib_api_version.c
+ LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
${CMATH_LIBRARIES}
+- TEMPLATES ${grib_api_extra_srcs})
+-
++ TEMPLATES ${grib_api_extra_srcs}
++ SOVERSION ${ECCODES_SOVERSION})
+
+ install( FILES grib_api.h eccodes.h eccodes_windef.h DESTINATION ${INSTALL_INCLUDE_DIR}
)
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/eccodes_version.h DESTINATION
${INSTALL_INCLUDE_DIR} )
diff --git a/eccodes.spec b/eccodes.spec
new file mode 100644
index 0000000..e93edbf
--- /dev/null
+++ b/eccodes.spec
@@ -0,0 +1,352 @@
+Name: eccodes
+Version: 2.7.0
+Release: 1%{?dist}
+Summary: WMO data format decoding and encoding
+
+# force the shared libraries to have these so versions
+%global so_version 0.1
+%global so_version_f90 0.1
+
+# latest rawhide grib_api version is 1.25.0-4
+# but this version number is to be updated as soon as we know
+# what the final release of grib_api by upstream will be.
+%global final_grib_api_version 1.25.0-4
+
+# license remarks:
+# most of eccodes is licensed ASL 2.0 but some special cases must be noted.
+# these 2 files:
+# src/grib_yacc.c
+# src/grib_yacc.h
+# contain a special exception clause that allows them to be
+# relicensed if they are included in a larger project
+# and these 3 files:
+# src/grib_accessor_class_bufr_data_element.c
+# src/grib_accessor_class_pack_bufr_values.c
+# src/grib_accessor_class_unpack_bufr_values.c
+# are LGPL licensed.
+# It seems this is a mistake upstream.
+# I reported this at:
+#
https://software.ecmwf.int/issues/browse/SUP-2387
+# (unfortunately this issue is not yet public)
+# and they confirm this, and have fixed this for their next release 2.8.0.
+
+License: ASL 2.0
+
+URL:
https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
+Source0:
https://software.ecmwf.int/wiki/download/attachments/45757960/eccodes-%{v...
+# note: this data package is unversioned upstream but still it is updated
+# now and then. The current copy was downloaded 03-Jan-2018
+Source1:
http://download.ecmwf.org/test-data/grib_api/eccodes_test_data.tar.gz
+# Support 32-bit
+#
https://software.ecmwf.int/issues/browse/SUP-1813
+# (unfortunately this issue is not public)
+Patch1: eccodes-32bit.patch
+# Add soversion to the shared libraries, since upstream refuses to do so
+#
https://software.ecmwf.int/issues/browse/SUP-1809
+Patch2: eccodes-soversion.patch
+# remove rpath from cmake/pkg-config.pc.in
+Patch3: eccodes-rpath.patch
+# fix compile flags in fortran checks
+#
https://software.ecmwf.int/issues/browse/SUP-1812
+# (unfortunately this issue is not public)
+Patch4: eccodes-fortran-check.patch
+
+# note that the requests to make the other issues public are filed here:
+#
https://software.ecmwf.int/issues/browse/SUP-2073
+# (and again, unfortunately this issue is not public)
+
+BuildRequires: cmake3
+BuildRequires: gcc
+BuildRequires: gcc-gfortran
+BuildRequires: /usr/bin/git
+BuildRequires: jasper-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: netcdf-devel
+BuildRequires: numpy
+BuildRequires: openjpeg2-devel
+BuildRequires: python2-devel
+
+# For tests
+BuildRequires: perl(Getopt::Long)
+BuildRequires: perl(Test::More)
+
+# the data is needed by the library and all tools provided in the main package
+# the other way arpund, the data package could be installed without
+# installing the base package. It will probably be pretty useless,
+# unless a user wishes to read and study all these grib and bufr
+# file format definitions.
+Requires: %{name}-data = %{version}-%{release}
+
+# NOTE: upstream writes:
+# """
+# For GRIB encoding and decoding, the GRIB-API functionality is provided
+# fully in ecCodes with only minor interface and behaviour changes.
+# Interfaces for C, Fortran 90 and Python are all maintained as in GRIB-API.
+# However, the GRIB-API Fortran 77 interface is no longer available.
+# """
+# Therefore, since the library name and pkg-config file content changes
+# and fortran77 support was removed, this replacement package cannot be
+# considered compatible enough and no Provides can be defined.
+#
+# Furthermore, upstream writes:
+# "Please note that GRIB-API support is being discontinued at the end of
2018."
+# So the old grib_api will need to be obsoleted.
+
+Obsoletes: grib_api < %{final_grib_api_version}
+
+%description
+ecCodes is a package developed by ECMWF which provides an application
+programming interface and a set of tools for decoding and encoding messages
+in the following formats:
+
+ * WMO FM-92 GRIB edition 1 and edition 2
+ * WMO FM-94 BUFR edition 3 and edition 4
+ * WMO GTS abbreviated header (only decoding).
+
+A useful set of command line tools provide quick access to the messages. C,
+Fortran 90 and Python interfaces provide access to the main ecCodes
+functionality.
+
+ecCodes is an evolution of GRIB-API. It is designed to provide the user with
+a simple set of functions to access data from several formats with a key/value
+approach.
+
+For GRIB encoding and decoding, the GRIB-API functionality is provided fully
+in ecCodes with only minor interface and behaviour changes. Interfaces for C,
+Fortran 90 and Python are all maintained as in GRIB-API. However, the
+GRIB-API Fortran 77 interface is no longer available.
+
+In addition, a new set of functions with the prefix "codes_" is provided to
+operate on all the supported message formats. These functions have the same
+interface and behaviour as the "grib_" functions.
+
+A selection of GRIB-API tools has been included in ecCodes (ecCodes GRIB
+tools), while new tools are available for the BUFR (ecCodes BUFR tools) and
+GTS formats. The new tools have been developed to be as similar as possible
+to the existing GRIB-API tools maintaining, where possible, the same options
+and behaviour. A significant difference compared with GRIB-API tools is that
+bufr_dump produces output in JSON format suitable for many web based
+applications.
+
+
+%package devel
+Summary: Contains ecCodes development files
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: gcc-gfortran%{?_isa}
+Requires: jasper-devel%{?_isa}
+
+Obsoletes: grib_api-devel < %{final_grib_api_version}
+
+%description devel
+Header files and libraries for ecCodes.
+
+# note: python3 is not yet supported by eccodes
+%package -n python2-%{name}
+Summary: A python2 interface to ecCodes
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: gcc-gfortran%{?_isa}
+Requires: jasper-devel%{?_isa}
+
+# a sub package python2-grib_api did not exist
+# so no obsoletes needed here
+
+%description -n python2-%{name}
+A python2 interface to ecCodes. Also a legacy interface to gribapi is provided.
+
+%package data
+Summary: Data needed by the eccodes library and tools
+BuildArch: noarch
+
+%description data
+This package provides all tables and definitions needed
+to encode and decode grib and bufr files, and includes
+both the official WMO tables and a number of often used
+local definitions by ECMWF and other meteorological centers.
+
+%package doc
+Summary: Documentation and example code
+BuildArch: noarch
+
+# a sub package grib_api-doc did not exist
+# so no obsoletes needed here
+
+%description doc
+This package contains the html documentation for ecCodes
+and a fair number of example programs and scripts to use it
+in C, Fortran 90, and Python.
+
+%prep
+%autosetup -n %{name}-%{version}-Source -p1
+
+# unpack the test data below build
+mkdir build
+cd build
+tar xf %SOURCE1
+
+# remove executable permissions from c files
+cd ..
+chmod 644 tigge/*.c
+chmod 644 tools/*.c
+
+# remove executable permissions from the authors and license file
+chmod 644 AUTHORS LICENSE
+
+%build
+cd build
+
+#-- The following features are disabled by default and not switched on:
+#
+# * AEC , support for Adaptive Entropy Coding
+# * MEMFS , Memory based access to definitions/samples
+# * MEMORY_MANAGEMENT , enable memory management
+# * ALIGN_MEMORY , enable memory alignment
+# * GRIB_TIMER , enable timer
+# * ECCODES_THREADS , enable POSIX threads
+#
+#-- The following features are disabled by default and switched on:
+# * PNG , support for PNG decoding/encoding
+# * ECCODES_OMP_THREADS , enable OMP threads
+# * EXTRA_TESTS , enable extended regression testing
+#
+#-- Also add an explicit option to not use rpath
+#
+# Note: -DINSTALL_LIB_DIR=%%{_lib} is needed because otherwise
+# the library so files get installed in /usr/lib in stead
+# of /usr/lib64 on x86_64.
+# Note: -DPYTHON_EXECUTABLE was added to prevent deprecation warnings
+# during running of tests which breaks
+# Test #184: eccodes_p_grib_keys_iterator_test
+
+%cmake3 -DINSTALL_LIB_DIR=%{_lib} \
+ -DENABLE_ECCODES_OMP_THREADS=ON \
+ -DENABLE_EXTRA_TESTS=ON \
+ -DENABLE_PNG=ON \
+ -DCMAKE_SKIP_RPATH=TRUE \
+ -DECCODES_SOVERSION=%{so_version} \
+ -DECCODES_SOVERSION_F90=%{so_version_f90} \
+ -DPYTHON_EXECUTABLE=%{_bindir}/python2 \
+ ..
+
+%make_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/
+
+%install
+%make_install -C build
+mkdir -p %{buildroot}%{_fmoddir}
+mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}/
+
+# remove a script that does not belong in the doc section
+# and triggers an rpmlint error
+rm %{buildroot}%{_datadir}/%{name}/definitions/installDefinitions.sh
+# by the way, is there a way in the files section to include a directory
+# but exclude a given file in it? I could not find such a trick.
+
+# copy the html documentation to the install directory
+mkdir -p %{buildroot}%{_datadir}/doc/%{name}/
+cp -r html %{buildroot}%{_datadir}/doc/%{name}/
+# and remove an unneeded Makefile from the html directory
+rm %{buildroot}%{_datadir}/doc/%{name}/html/Makefile.am
+
+# copy the example scripts/programs to the install directory
+# but dont copy the shell scripts and Makefiles, since these
+# are part of the cmake test setup and not usefull as example.
+# Use %%{_datadir}/doc/%%{name}/ rather than %%{_datadir}/%%{name}/
+# otherwise the rpmbuild will create a lot off unnecessary
+# pyc and pyo files.
+
+mkdir -p %{buildroot}%{_datadir}/doc/%{name}/examples/C
+cp examples/C/*.c %{buildroot}%{_datadir}/doc/%{name}/examples/C
+mkdir -p %{buildroot}%{_datadir}/doc/%{name}/examples/F90
+cp examples/F90/*.f90 %{buildroot}%{_datadir}/doc/%{name}/examples/F90
+mkdir -p %{buildroot}%{_datadir}/doc/%{name}/examples/python
+cp examples/python/*.py %{buildroot}%{_datadir}/doc/%{name}/examples/python
+cp examples/python/*.c %{buildroot}%{_datadir}/doc/%{name}/examples/python
+cp examples/python/*.csv %{buildroot}%{_datadir}/doc/%{name}/examples/python
+
+# adapt a shebang to make it point explicitely to python2
+sed -i -e 's/\/bin\/env python/\/usr\/bin\/python2/' \
+ %{buildroot}%{_datadir}/doc/%{name}/examples/python/high_level_api.py
+
+# move the sample files into /usr/share/doc/eccodes
+mv %{buildroot}%{_datadir}/%{name}/ifs_samples/ %{buildroot}%{_datadir}/doc/%{name}/
+mv %{buildroot}%{_datadir}/%{name}/samples/ %{buildroot}%{_datadir}/doc/%{name}/
+
+# move cmake files to the cmake folder below libdir
+# as suggested in the review request
+mkdir -p %{buildroot}%{_libdir}/cmake/%{name}/
+mv %{buildroot}%{_datadir}/%{name}/cmake/* %{buildroot}%{_libdir}/cmake/%{name}/
+
+%ldconfig_scriptlets
+
+%check
+cd build
+
+# notes:
+# * the LD_LIBRARY_PATH setting is required to let the tests
+# run inside the build dir, otherwise they are broken due to
+# the removal of rpath
+# * the LIBRARY_PATH setting is needed te let the
+# '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.
+#
+# These fail due to build flag issues, i.e. the test script does a
+# test build of some on the fly generated fortran code, but cannot
+# find the necessary *.mod fortran module definition files.
+# There is no easy way to define this as environment setting,
+# so a patch has been added to solve this for now.
+# See:
https://software.ecmwf.int/issues/browse/SUP-1812
+# (unfortunately this issue is not public)
+LD_LIBRARY_PATH=%{buildroot}/%{_libdir} \
+LIBRARY_PATH=%{buildroot}/%{_libdir} \
+ctest -V %{?_smp_mflags}
+
+%files
+%license LICENSE
+%doc README ChangeLog AUTHORS
+%{_bindir}/*
+%{_libdir}/*.so.*
+
+%files -n python2-%{name}
+%{python2_sitearch}/%{name}
+%{python2_sitearch}/%{name}-*-py*.egg-info
+%{python2_sitearch}/gribapi
+
+%files devel
+%{_includedir}/*
+%{_fmoddir}/%{name}.mod
+%{_fmoddir}/grib_api.mod
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/pkgconfig/%{name}_f90.pc
+%{_libdir}/*.so
+%dir %{_libdir}/cmake/%{name}
+%{_libdir}/cmake/%{name}/*
+
+%files data
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/definitions/
+
+%files doc
+%doc %{_datadir}/doc/%{name}/
+
+%changelog
+* Thu Mar 22 2018 Jos de Kloe <josdekloe(a)gmail.com> - 2.7.0-1
+- Upgrade to version 2.7.0
+- Fix rpath and some permission issues
+- Remove Provides, add post/postun sections, add LD_LIBRARY_PATH
+- Fix failing tests in check section
+- Implement so version because upstream refuses to do so
+- Add fix for test failure 184 and ldconfig_scriptlets
+ and move unversioned so file to devel package
+ as suggested by Robert-André Mauchin
+- Add a documentation and a data sub-package
+- Change the license and add a note explaining why this was done
+
+* Fri Mar 24 2017 Orion Poplawski <orion(a)cora.nwra.com> - 2.2.0-1
+- Initial Fedora package