[grib_api/cmake] Initial attempt at cmake support - no soname though

Orion Poplawski orion at fedoraproject.org
Tue Dec 30 21:15:29 UTC 2014


commit 46904b55c47ad6cc0a722a209b62607f534660bd
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Mon Dec 15 11:18:29 2014 -0700

    Initial attempt at cmake support - no soname though

 .gitignore    |    1 +
 grib_api.spec |   36 +++++++++++++++++++++---------------
 sources       |    2 +-
 3 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8f6f126..12a643e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ grib_api-1.7.0.tar.gz
 /grib_api-1.12.0.tar.gz
 /grib_api-1.12.1.tar.gz
 /grib_api-1.12.3.tar.gz
+/grib_api-1.13.0.tar.gz
diff --git a/grib_api.spec b/grib_api.spec
index 2f4d127..92a3182 100644
--- a/grib_api.spec
+++ b/grib_api.spec
@@ -1,6 +1,6 @@
 Name:           grib_api
-Version:        1.12.3
-Release:        5%{?dist}
+Version:        1.13.0
+Release:        1%{?dist}
 Summary:        WMO FM-92 GRIB (v1,v2) interface accessible from C and FORTRAN programs
 
 Group:          Applications/System
@@ -61,11 +61,11 @@ Requires:   numpy
 
 %prep
 %setup -q
-%patch0 -p1 -b .link
-%patch1 -p1 -b .python
+#patch0 -p1 -b .link
+#patch1 -p1 -b .python
 # Fix rpath issues by using Fedora's libtool
 rm m4/libtool.m4
-autoreconf -f -i
+#autoreconf -f -i
 # Fix ksh path
 sed -i -e 's,/usr/bin/ksh,/bin/ksh,' tools/grib1to2.txt
 # Fix permissions
@@ -73,9 +73,12 @@ find -name \*.c | xargs chmod -x
 
 
 %build
-%{configure} --with-ifs-samples=%{_datadir}/%{name}/ifs_samples \
-  --enable-python --with-netcdf=%{_libdir} --with-pic --with-png-support
-make
+#{configure} --with-ifs-samples=%{_datadir}/%{name}/ifs_samples \
+# --enable-python --with-netcdf=%{_libdir} --with-pic --with-png-support
+mkdir build
+cd build
+%cmake -DINSTALL_LIB_DIR=%{_lib} ..
+make %{?_smp_mflags}
 # Fails sometimes building fortran module:
 # Fatal Error: Can't delete temporary module file 'grib_api.mod0': No such file or directory
 # %{?_smp_mflags}
@@ -83,7 +86,9 @@ make
 
 %install
 rm -rf %{buildroot}
+cd build
 make install DESTDIR=%{buildroot}
+cd -
 
 find %{buildroot} -name \*.la -delete
 
@@ -98,15 +103,13 @@ mv %{buildroot}%{_bindir}/parser %{buildroot}%{_bindir}/grib-parser
 # Give these files some normal permissions
 chmod 644 README LICENSE COPYING ChangeLog AUTHORS
 
-# Move the fortran module into _fmoddir
+# Install the fortran module into _fmoddir
+# https://software.ecmwf.int/issues/browse/SUP-1114
 mkdir -p %{buildroot}%{_fmoddir}
-mv %{buildroot}%{_includedir}/%{name}.mod %{buildroot}%{_fmoddir}
+cp -p build/fortran/modules/%{name}.mod %{buildroot}%{_fmoddir}
 
-# Fix permission
-chmod +x %{buildroot}%{_datadir}/%{name}/definitions/installDefinitions.sh
-
-# Don't ship static archive
-rm %{buildroot}%{python_sitearch}/_gribapi_swig.a
+# Install
+cp -p definitions/installDefinitions.sh %{buildroot}%{_datadir}/%{name}/definitions/installDefinitions.sh
 
 
 %clean
@@ -147,6 +150,9 @@ make check || true
 %{_libdir}/*.a
 
 %changelog
+* Mon Dec 15 2014 Orion Poplawski <orion at cora.nwra.com> - 1.13.0-1
+- Update to 1.13.0
+
 * Mon Oct 20 2014 Orion Poplawski <orion at cora.nwra.com> - 1.12.3-5
 - Add BR libpng-devel
 
diff --git a/sources b/sources
index a3f4c93..fb4a5b5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-584f60702aeed70330cca42d13b96889  grib_api-1.12.3.tar.gz
+3fdae4e771c486e5f660a073de1ecd8a  grib_api-1.13.0.tar.gz


More information about the scm-commits mailing list