Blob Blame History Raw
# Package whose only architecture dependent binary is a library
%global debug_package %{nil}

Name:           cgnslib
Version:        3.1
Release:        5.r4%{?dist}
Summary:        Computational Fluid Dynamics General Notation System

Group:          Development/Libraries
License:        zlib
URL:            http://www.cgns.org/

Source:         http://sourceforge.net/projects/cgns/files/%{name}_%{version}/%{name}_%{version}.3-4.tar.gz
Source1:        http://www.grc.nasa.gov/WWW/cgns/CGNS_docs_current/user/usersguide.pdf

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  hdf5-devel >= 1.8
BuildRequires:  zlib-devel
BuildRequires:  gcc-gfortran
BuildRequires:  chrpath
BuildRequires:  cmake
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) analysis
data. 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:      Header files for %{name} package
Group:        Development/Libraries
Requires:     %{name} = %{version}-%{release}   
Requires:     hdf5-devel

%description devel
The %{name}-devel package contains the header files
for %{name} package.

%prep
%setup -q -n %{name}_%{version}.3

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

%{__cp} %{SOURCE1} %{_builddir}/%{name}_%{version}.3

%build
%cmake . -DCMAKE_SKIP_RPATH:BOOL=YES
%{__make} %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name libcgns.a -exec rm -f  {} \;

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc readme.lyx
%{_bindir}/cgnames
%{_bindir}/cgnscheck
%{_bindir}/cgnsconvert
%{_bindir}/cgnsdiff
%{_bindir}/cgnslist
%{_bindir}/cgnsupdate
%{_bindir}/cgnsversion
%{_libdir}/libcgns.so.3.1

%files devel
%defattr(-,root,root,-)
%doc usersguide.pdf
%{_includedir}/cgns_io.h
%{_includedir}/cgnslib.h
%{_includedir}/cgnslib_f.h
%{_includedir}/cgnstypes.h
%{_includedir}/cgnstypes_f.h
%{_includedir}/cgnswin_f.h
%{_libdir}/libcgns.so

%changelog
* 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