netcdf/netcdf.spec
2014-01-29 22:26:00 -07:00

395 lines
12 KiB
RPMSpec

Name: netcdf
Version: 4.1.1
Release: 3%{?dist}.5
Summary: Libraries for the Unidata network Common Data Form
Group: Applications/Engineering
License: NetCDF
URL: http://www.unidata.ucar.edu/software/netcdf/
Source0: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-%{version}.tar.gz
#Use pkgconfig in nc-config to avoid multi-lib issues
Patch0: netcdf-4.1-beta2-pkgconfig.patch
Patch1: netcdf-4.1.1-fflags.patch
#Explicitly link libnetcdf.so agains -lhdf5_hl -lhdf5, reported upstream
Patch2: netcdf-4.1.1-hdf5.patch
# Fix namespace conflict with ncurses (bug #924467)
Patch3: netcdf-4.1.1-dap.patch
# Patch to fix nofill mode bug
# http://www.unidata.ucar.edu/jira/browse/NCF-22
Patch4: http://www.unidata.ucar.edu/netcdf/patches/nofill-bug.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# bison is required because we patch dap.y in the dap patch
BuildRequires: bison
BuildRequires: gcc-gfortran, gawk
BuildRequires: hdf5-devel >= 1.8.4
BuildRequires: libcurl-devel
BuildRequires: zlib-devel
BuildRequires: valgrind
%package devel
Summary: Development files for netcdf
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%if 0%{?fedora}
Requires: gcc-gfortran%{_isa}
%else
Requires: gcc-gfortran
%endif
Requires: pkgconfig
Requires: hdf5-devel
Requires: libcurl-devel
%package static
Summary: Static libs for netcdf
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description
NetCDF (network Common Data Form) is an interface for array-oriented
data access and a freely-distributed collection of software libraries
for C, Fortran, C++, and perl that provides an implementation of the
interface. The NetCDF library also defines a machine-independent
format for representing scientific data. Together, the interface,
library, and format support the creation, access, and sharing of
scientific data. The NetCDF software was developed at the Unidata
Program Center in Boulder, Colorado.
NetCDF data is:
o Self-Describing: A NetCDF file includes information about the
data it contains.
o Network-transparent: A NetCDF file is represented in a form that
can be accessed by computers with different ways of storing
integers, characters, and floating-point numbers.
o Direct-access: A small subset of a large dataset may be accessed
efficiently, without first reading through all the preceding
data.
o Appendable: Data can be appended to a NetCDF dataset along one
dimension without copying the dataset or redefining its
structure. The structure of a NetCDF dataset can be changed,
though this sometimes causes the dataset to be copied.
o Sharable: One writer and multiple readers may simultaneously
access the same NetCDF file.
%description devel
This package contains the netCDF header files, shared devel libs, and
man pages.
%description static
This package contains the netCDF static libs.
%prep
%setup -q
%patch0 -p1 -b .pkgconfig
%patch1 -p1 -b .fflags
%patch2 -p1 -b .hdf5
%patch3 -p1 -b .dap
%patch4 -p0 -b .nofill
%build
export F77="gfortran"
export FC="gfortran"
export FFLAGS="${RPM_OPT_FLAGS}"
export FCFLAGS="$FFLAGS"
%configure \
--enable-shared \
--enable-netcdf-4 \
--enable-dap \
--enable-ncgen4 \
--enable-extra-example-tests \
%ifnarch ppc64
--enable-valgrind-tests \
%endif
--disable-dap-remote-tests
#Need to be able to properly list all hdf4 library deps and location
# --enable-hdf4 \
make #%{?_smp_mflags}
%install
make install DESTDIR=${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_fmoddir}
/bin/mv ${RPM_BUILD_ROOT}%{_includedir}/*.mod \
${RPM_BUILD_ROOT}%{_fmoddir}
/bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
/bin/rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
%check
make check
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/netcdf.info \
%{_infodir}/dir 2>/dev/null || :
%postun
/sbin/ldconfig
if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/netcdf.info \
%{_infodir}/dir 2>/dev/null || :
fi
%files
%defattr(-,root,root,-)
%doc COPYRIGHT README
%{_bindir}/nccopy
%{_bindir}/ncdump
%{_bindir}/ncgen
%{_bindir}/ncgen3
%{_libdir}/*.so.*
%{_mandir}/man1/*
%{_datadir}/doc/netcdf
%{_infodir}/*
%files devel
%defattr(-,root,root,-)
%{_bindir}/nc-config
%{_includedir}/ncvalues.h
%{_includedir}/netcdf.h
%{_includedir}/netcdf.hh
%{_includedir}/netcdf.inc
%{_includedir}/netcdfcpp.h
%{_fmoddir}/*.mod
%{_libdir}/*.so
%{_libdir}/pkgconfig/netcdf.pc
%{_mandir}/man3/*
%files static
%defattr(-,root,root,-)
%{_libdir}/*.a
%changelog
* Wed Jan 29 2014 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3.5
- Fix nc-config --fflags (bug #1032110)
* Mon Oct 21 2013 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3.4
- Add upstream patch to fix nofill mode data corruption bug
* Fri Mar 22 2013 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3.3
- Add patch to fix namespace conflict with ncurses (bug #924467)
- Add BR on bison due to patching dap.y
* Mon Dec 27 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3.2
- Don't use %%{_isa} in Requires for gcc-gfortran - not multilib in RHEL
* Mon May 17 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3.1
- valgrind crashes on ppc64 (bug #593027), don't use it
* Mon Apr 19 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-3
- Explicitly link libnetcdf.so against -lhdf5_hl -lhdf5
* Fri Apr 9 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-2
- Add patch to cleanup nc-config --fflags
* Thu Apr 8 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.1-1
- Update to 4.1.1
* Fri Feb 5 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-1
- Update to 4.1.0 final
* Mon Feb 1 2010 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.8.2010020100
- Update snapshot, pkgconfig patch
- Re-enable make check
* Sat Dec 5 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.7.2009120100
- Leave include files in /usr/include
* Tue Dec 1 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.6.2009120100
- Update snapshot, removes SZIP defines from header
* Fri Nov 13 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.5.2009111309
- Update snapshot
- Docs are installed now
* Wed Nov 11 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.5.2009111008
- Explicitly link libnetcdf to the hdf libraries, don't link with -lcurl
* Wed Nov 11 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.4.2009111008
- Add Requires: libcurl-devel to devel package
* Wed Nov 11 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.3.2009111008
- Drop hdf4 support - too problematic with linking all required libraries
* Wed Nov 11 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.2.2009111008
- Add patch to use proper hdf4 libraries
- Add Requires: hdf-devel, hdf5-devel to devel package
- Move nc-config to devel package
* Wed Nov 11 2009 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-0.1.2009111008
- Update to 4.1.0 beta 2 snapshot
- Enable: netcdf-4, dap, hdf4, ncgen4, a lot more tests
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Apr 16 2009 Orion Poplawski <orion@cora.nwra.com> - 4.0.1-1
- Update to 4.0.1
- Add pkgconfig file
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Sep 3 2008 Orion Poplawski <orion@cora.nwra.com> - 4.0.0-1
- Update to 4.0 final
- Drop netcdf-3 symlink (bug #447158)
- Update cstring patch, partially upstreamed
* Thu May 29 2008 Balint Cristian <rezso@rdsor.ro> - 4.0.0-0.6.beta2
- fix symlink to netcdf-3
* Sun May 18 2008 Patrice Dumas <pertusus@free.fr> - 4.0.0-0.5.beta2
- use %%{_fmoddir}
- don't use %%makeinstall
* Thu May 15 2008 Balint Cristian <rezso@rdsor.ro> - 4.0.0-0.4.beta2
- re-enable ppc64 since hdf5 is now present for ppc64
* Thu May 8 2008 Ed Hill <ed@eh3.com> - 4.0.0-0.3.beta2
- make package compliant with bz # 373861
* Thu May 8 2008 Ed Hill <ed@eh3.com> - 4.0.0-0.2.beta2
- ExcludeArch: ppc64 since it doesn't (for now) have hdf5
* Wed May 7 2008 Ed Hill <ed@eh3.com> - 4.0.0-0.1.beta2
- try out upstream 4.0.0-beta2
* Wed Apr 2 2008 Orion Poplawski <orion@cora.nwra.com> - 3.6.2-7
- Change patch to include <cstring>
- Remove %%{?_smp_mflags} - not parallel build safe (fortran modules)
* Wed Feb 20 2008 Ed Hill <ed@eh3.com> - 3.6.2-6
- add patch that (hopefully?) allows the GCC 4.3 build to proceed
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.6.2-5
- Autorebuild for GCC 4.3
* Sat Aug 25 2007 Ed Hill <ed@eh3.com> - 3.6.2-4
- add BR: gawk
* Sat Aug 25 2007 Ed Hill <ed@eh3.com> - 3.6.2-3
- rebuild for BuildID
* Mon May 21 2007 Orion Poplawski <orion@cora.nwra.com> - 3.6.2-2
- Run checks
* Sat Mar 17 2007 Ed Hill <ed@eh3.com> - 3.6.2-1
- 3.6.2 has a new build system supporting shared libs
* Sat Sep 2 2006 Ed Hill <ed@eh3.com> - 3.6.1-4
- switch to compat-gcc-34-g77 instead of compat-gcc-32-g77
* Sat Sep 2 2006 Ed Hill <ed@eh3.com> - 3.6.1-3
- rebuild for imminent FC-6 release
* Thu May 11 2006 Ed Hill <ed@eh3.com> - 3.6.1-2
- add missing BuildRequires for the g77 interface
* Fri Apr 21 2006 Ed Hill <ed@eh3.com> - 3.6.1-1
- update to upstream 3.6.1
* Thu Feb 16 2006 Ed Hill <ed@eh3.com> - 3.6.0-10.p1
- rebuild for new GCC
* Thu Dec 22 2005 Orion Poplawski <orion@cora.nwra.com> - 3.6.0-9.p1
- rebuild for gcc4.1
* Sun Oct 16 2005 Ed Hill <ed@eh3.com> - 3.6.0-8.p1
- building the library twice (once each for g77 and gfortran)
fixes an annoying problem for people who need both compilers
* Fri Sep 29 2005 Ed Hill <ed@eh3.com> - 3.6.0-7.p1
- add FFLAGS="-fPIC"
* Fri Jun 13 2005 Ed Hill <ed@eh3.com> - 3.6.0-6.p1
- rebuild
* Fri Jun 3 2005 Ed Hill <ed@eh3.com> - 3.6.0-5.p1
- bump for the build system
* Mon May 9 2005 Ed Hill <ed@eh3.com> - 3.6.0-4.p1
- remove hard-coded dist/fedora macros
* Wed May 5 2005 Ed Hill <ed@eh3.com> - 3.6.0-3.p1
- make netcdf-devel require netcdf (bug #156748)
- cleanup environment and paths
* Tue Apr 5 2005 Ed Hill <ed@eh3.com> - 0:3.6.0-2.p1
- update for gcc-gfortran
- fix file permissions
* Sat Mar 5 2005 Ed Hill <ed@eh3.com> - 0:3.6.0-1.p1
- update for 3.6.0-p1 large-files-bug fix and remove the Epoch
* Sun Dec 12 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0-0.2.beta6
- fix naming scheme for pre-releases (per Michael Schwendt)
* Sat Dec 11 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.2
- For Fortran, use only g77 (ignore gfortran, even if its installed)
* Tue Dec 7 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.1
- remove "BuildRequires: gcc4-gfortran"
* Sat Dec 4 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.0
- upgrade to 3.6.0beta6
- create separate devel package that does *not* depend upon
the non-devel package and put the headers/libs in "netcdf-3"
subdirs for easy co-existance with upcoming netcdf-4
* Thu Dec 2 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.12
- remove unneeded %%configure flags
* Wed Dec 1 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.11
- headers in /usr/include/netcdf, libs in /usr/lib/netcdf
* Mon Oct 4 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.10
- Put headers in their own directory but leave the libraries in the
%%{_libdir} -- there are only two libs and the majority of other
"*-devel" packages follow this pattern
* Sun Oct 3 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:3.5.1-0.fdr.9
- add patch to install lib and headers into own tree
* Sun Aug 1 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.8
- added -fPIC so x86_64 build works with nco package
* Fri Jul 30 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.7
- fix typo in the x86_64 build and now works on x86_64
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.6
- fix license
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.5
- fix (hopefully?) x86_64 /usr/lib64 handling
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.4
- replace paths with macros
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.3
- fix spelling
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.2
- removed "--prefix=/usr" from %%configure
* Wed Jul 14 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.1
- Remove unnecessary parts and cleanup for submission
* Wed Jul 14 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.0
- Initial RPM release.