Blob Blame History Raw
Name:           cgnslib
Version:        3.3.1
Release:        1%{?dist}
Summary:        Computational Fluid Dynamics General Notation System
License:        zlib
URL:            http://www.cgns.org/
Source0:        https://github.com/CGNS/CGNS/archive/v%{version}/%{name}-%{version}.tar.gz
# Install Fortran module into proper location
Patch0:         cgnslib-fmod.patch
# Fix cmake error: install TARGETS given no LIBRARY DESTINATION for shared library target
Patch1:         cgnslib-cmake.patch

BuildRequires:  cmake
BuildRequires:  gcc-gfortran
BuildRequires:  hdf5-devel
BuildRequires:  libXmu-devel
BuildRequires:  mesa-libGL-devel
BuildRequires:  mesa-libGLU-devel
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
BuildRequires:  zlib-devel
Requires:       hdf5 = %{_hdf5_version}

%description
The Computational Fluid Dynamics General Notation System (CGNS) provides a
general, portable, and extensible standard for the storage and retrieval of
computational fluid dynamics (CFD) analysisdata. It consists of a collection
of conventions, and free and open software implementing those conventions. It
is self-descriptive, machine-independent, well-documented, and administered by
an international steering committee.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       hdf5-devel%{?_isa}

%description    devel
This package contains libraries and header files for
developing applications that use %{name} libraries.

%prep
%autosetup -p1 -n CGNS-%{version}

# Multi-lib path fix.
sed -i "s|\${CMAKE_INSTALL_PREFIX}/lib|\${CMAKE_INSTALL_PREFIX}/\${LIB_INSTALL_DIR}|" CMakeLists.txt
sed -i "s|DESTINATION lib|DESTINATION \${LIB_INSTALL_DIR}|" src/CMakeLists.txt

%build
%cmake -DCMAKE_SKIP_RPATH=ON \
       -DCGNS_ENABLE_TESTS=ON \
       -DCGNS_ENABLE_FORTRAN=ON \
       -DCGNS_BUILD_CGNSTOOLS=ON \
       -DCGNS_ENABLE_HDF5=ON
# FIXME: Ugly workaround for build order issue which results in
# an incomplete libcgns.so being created during the first run
make || rm src/libcgns.so* && make


%install
%make_install
find %{buildroot} -name '*.a' -delete -print

%check
LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%license license.txt
%doc release_docs/Release.txt README.md
%{_bindir}/adf2hdf
%{_bindir}/cgconfig
%{_bindir}/cgnscalc
%{_bindir}/cgnscheck
%{_bindir}/cgnscompress
%{_bindir}/cgnsconvert
%{_bindir}/cgnsdiff
%{_bindir}/cgnslist
%{_bindir}/cgnsplot
%{_bindir}/cgnsnodes
%{_bindir}/cgnsnames
%{_bindir}/cgnstools/
%{_bindir}/cgnsupdate
%{_bindir}/cgnsview
%{_bindir}/hdf2adf
%{_bindir}/unitconv
%{_datadir}/cgnstools/
%{_libdir}/libcgns.so.3.3

%files devel
%{_includedir}/cgnsBuild.defs
%{_includedir}/cgns_io.h
%{_includedir}/cgnslib.h
%{_includedir}/cgnstypes.h
%{_includedir}/cgnstypes_f.h
%{_includedir}/cgnstypes_f03.h
%{_includedir}/cgnswin_f.h
%{_includedir}/cgnsconfig.h
%{_libdir}/libcgns.so
%{_fmoddir}/cgns.mod

%changelog
* Sat Aug 05 2017 Sandro Mani <manisandro@gmail.com> - 3.3.1-1
- Update to 3.3.1

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 3.3.0-3
- Rebuild (gfortran)

* Tue Dec 06 2016 Orion Poplawski <orion@cora.nwra.com> - 3.3.0-2
- Rebuild for hdf5 1.8.18

* Wed Jun 29 2016 Orion Poplawski <orion@cora.nwra.com> - 3.3.0-1
- Update to 3.3.0
- Add patch to change Fortran module install location

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 21 2016 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-6
- Rebuild for hdf5 1.8.16

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-4
- Rebuild for hdf5 1.8.15

* Wed Jan 07 2015 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-3
- Rebuild for hdf5 1.8.4

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jun 30 2014 Christopher Meng <rpm@cicku.me> - 3.2.1-1
- Update to 3.2.1
- Enable hdf5 support
- Enable fortran support
- Build cgnstools(included in main package)

* Tue Jun 10 2014 Orion Poplawski <orion@cora.nwra.com> - 3.2-6
- Rebuild for hdf 1.8.13

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Dec 27 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2-4
- Rebuild for hdf5 1.8.12

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu May 16 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2-2
- Rebuild for hdf5 1.8.11

* Mon Mar 18 2013 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> - 3.2-1
- new upstream version 3.2
- userguide not provided any more

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-5.r4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Dec 03 2012 Orion Poplawski <orion@cora.nwra.com> - 3.1-4.r4
- Rebuild for hdf5 1.8.10

* Wed Aug 15 2012 Shakthi Kannan <shakthimaan [AT] fedoraproject DOT org> 3.1-3.r4
- Updated to 3.1.3-4

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-8.r2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue May 15 2012 Orion Poplawski <orion@cora.nwra.com> - 2.5-7.rc2
- Rebuild for hdf5
- Explicitly require version of hdf5 built with

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-6.r2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Sep 01 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject DOT org> 2.5-5.r2
- Added hdf5 to Requires, and hdf5-devel to devel Requires.

* Thu Feb 17 2011 Shakthi Kannan <shakthimaan [AT] fedoraproject DOT org> 2.5-5.r1
- Updated to 2.5-5 release.

* Sun Jul 18 2010 Shakthi Kannan <shakthimaan [AT] fedoraproject DOT org> 2.5-3.r4
- Use zlib license that supercedes LGPLv2.

* Fri Jul 16 2010 Shakthi Kannan <shakthimaan [AT] fedoraproject DOT org> 2.5-2.r4
- Expanded CFD abbreviation.
- Added -devel sub-package.
- Added global debug_package nil.
- Added patch for creating shared library with soname.
- Added patch to fix library returning exit.
- Added usersguide.pdf to -devel sub-package.
- hdf5 atleast 1.8 is required.
- Added if condition for matching LINUX64 when copying library.

* Sat Aug 15 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 2.5-1.r4
- New Package