Ed Hill 8653ce0
Name:           nco
Orion Poplawski 03f5b64
Version:        4.0.8
Orion Poplawski 70b9129
Release:        2%{?dist}
Ed Hill 8653ce0
Summary:        Suite of programs for manipulating NetCDF/HDF4 files
Ed Hill 8653ce0
Group:          Applications/Engineering
6ca9083
License:        GPLv3
Ed Hill 8653ce0
URL:            http://nco.sourceforge.net/
Ed Hill 8653ce0
0b984cc
Source0:        http://nco.sourceforge.net/src/nco-%{version}.tar.gz
Orion Poplawski 6b10f00
Patch0:         nco-4.0.3-install_C_headers.patch
Orion Poplawski 9e7b051
%if 0%{?rhel} && 0%{?rhel} <= 5
Orion Poplawski 5808293
#Patch out variables from in.cdl that earlier versioins of netcdf complain about
Orion Poplawski 5808293
Patch1:         nco-4.0.5-fillvalue.patch
Orion Poplawski 5808293
%endif
Ed Hill 8653ce0
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Ed Hill 8653ce0
6c39ff7
BuildRequires:  bison, flex, gawk
Orion Poplawski 5808293
BuildRequires:  netcdf-devel
Orion Poplawski 21b9b41
%if 0%{?rhel} && 0%{?rhel} <= 5
Orion Poplawski 5808293
BuildRequires:  libnc-dap-devel
Orion Poplawski 5808293
%endif
95451d4
BuildRequires:  udunits2-devel
Orion Poplawski e77af3a
%if 0%{?fedora} >= 14
Orion Poplawski e77af3a
BuildRequires:  antlr-C++
Orion Poplawski e77af3a
%else
6c39ff7
BuildRequires:  antlr
Orion Poplawski e77af3a
%endif
0b984cc
BuildRequires:  gsl-devel
91e225b
BuildRequires:  texinfo-tex texinfo
Ed Hill 8653ce0
Ed Hill 8653ce0
%package devel
Ed Hill 8653ce0
Summary:        Development files for NCO
Ed Hill 8653ce0
Group:          Development/Libraries
Ed Hill 8653ce0
Requires:       %{name} = %{version}-%{release}
Ed Hill 8653ce0
6ca9083
%package static
6ca9083
Summary:        Static libraries for NCO
6ca9083
Group:          Development/Libraries
6ca9083
Requires:       %{name}-devel = %{version}-%{release}
6ca9083
Ed Hill 8653ce0
%description
Ed Hill 8653ce0
The netCDF Operators, NCO, are a suite of command line programs known
Ed Hill 8653ce0
as operators.  The operators facilitate manipulation and analysis of
Ed Hill 8653ce0
self-describing data stored in the freely available netCDF and HDF
Ed Hill 8653ce0
formats (http://www.unidata.ucar.edu/packages/netcdf and
Ed Hill 8653ce0
http://hdf.ncsa.uiuc.edu, respectively).  Each NCO operator (e.g.,
Ed Hill 8653ce0
ncks) takes netCDF or HDF input file(s), performs an operation (e.g.,
Ed Hill 8653ce0
averaging, hyperslabbing, or renaming), and outputs a processed netCDF
Ed Hill 8653ce0
file.  Although most users of netCDF and HDF data are involved in
Ed Hill 8653ce0
scientific research, these data formats, and thus NCO, are generic and
Ed Hill 8653ce0
are equally useful in fields from agriculture to zoology.  The NCO
Ed Hill 8653ce0
User's Guide illustrates NCO use with examples from the field of
Ed Hill 8653ce0
climate modeling and analysis.  The NCO homepage is
Ed Hill 8653ce0
http://nco.sourceforge.net/.
Ed Hill 8653ce0
Ed Hill 8653ce0
%description devel
6ca9083
This package contains the NCO header and development files.
6ca9083
6ca9083
%description static
6ca9083
This package contains the NCO static libs.
Ed Hill 8653ce0
Ed Hill 8653ce0
%prep
Ed Hill 8653ce0
%setup -q
25c64ff
%patch0 -p1 -b .install_C_headers
Orion Poplawski 9e7b051
%if 0%{?rhel} && 0%{?rhel} <= 5
Orion Poplawski 5808293
%patch1 -p1 -b .fillvalue
Orion Poplawski 5808293
%endif
Ed Hill 8653ce0
Ed Hill 8653ce0
%build
Orion Poplawski b2b8e6f
%if 0%{?rhel} && 0%{?rhel} <= 5
Orion Poplawski 5808293
export CPPFLAGS="-I%{_includedir}/netcdf-3 -I%{_includedir}/udunits2"
Orion Poplawski 5808293
%else
Orion Poplawski 70b9129
export CPPFLAGS="-I%{_includedir}/udunits2 -DENABLE_NETCDF4 -DHAVE_NETCDF4_H"
Orion Poplawski 5808293
%endif
Ed Hill 8653ce0
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
Ed Hill 8653ce0
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive -fPIC"
d211781
%configure \
5c902cb
  HAVE_ANTLR=yes \
6c53451
  --disable-dependency-tracking --includedir=%{_includedir}/nco \
Orion Poplawski b2b8e6f
%if 0%{?rhel} && 0%{?rhel} <= 5
Orion Poplawski 5808293
  --disable-dap-netcdf \
Orion Poplawski 5808293
  --enable-dap-opendap
Orion Poplawski 5808293
%else
6c53451
  --enable-netcdf4
Orion Poplawski 5808293
%endif
Ed Hill 8653ce0
make %{?_smp_mflags}
91e225b
pushd doc
91e225b
makeinfo --html --no-split nco.texi
91e225b
make nco.pdf
91e225b
popd
Ed Hill 8653ce0
Ed Hill 8653ce0
%install
6ca9083
rm -rf $RPM_BUILD_ROOT
6ca9083
mkdir -p $RPM_BUILD_ROOT%{_includedir}/nco
6ca9083
make install DESTDIR=$RPM_BUILD_ROOT
6ca9083
rm $RPM_BUILD_ROOT%{_libdir}/*.la
6ca9083
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Ed Hill 8653ce0
Ed Hill 8653ce0
%clean
6ca9083
rm -rf $RPM_BUILD_ROOT
Ed Hill 8653ce0
Ed Hill 8653ce0
Ed Hill 8653ce0
%post
Ed Hill 8653ce0
/sbin/ldconfig
6ca9083
/sbin/install-info %{_infodir}/nco.info \
Ed Hill 8653ce0
    %{_infodir}/dir 2>/dev/null || :
Ed Hill 8653ce0
Ed Hill 8653ce0
%postun
Ed Hill 8653ce0
/sbin/ldconfig
Ed Hill 8653ce0
if [ "$1" = 0 ]; then
6ca9083
  /sbin/install-info --delete %{_infodir}/nco.info \
Ed Hill 8653ce0
    %{_infodir}/dir 2>/dev/null || :
Ed Hill 8653ce0
fi
Ed Hill 8653ce0
Ed Hill 8653ce0
%files
Ed Hill 8653ce0
%defattr(-,root,root,-)
91e225b
%doc doc/README doc/LICENSE doc/rtfm.txt doc/nco.html doc/nco.pdf doc/nco.css
91e225b
%doc doc/index.shtml doc/TODO doc/ChangeLog doc/nco.png doc/nco_news.shtml
91e225b
%doc doc/nsf.png
Ed Hill 8653ce0
%{_bindir}/*
Ed Hill 8653ce0
%{_mandir}/*/*
Ed Hill 8653ce0
%{_infodir}/*
Ed Hill 8653ce0
%{_libdir}/libnco*[0-9]*.so
Ed Hill 8653ce0
Ed Hill 8653ce0
%files devel
Ed Hill 8653ce0
%defattr(-,root,root,-)
91e225b
%{_includedir}/nco/
Ed Hill 8653ce0
%{_libdir}/libnco.so
Ed Hill 8653ce0
%{_libdir}/libnco_c++.so
Ed Hill 8653ce0
6ca9083
%files static
6ca9083
%defattr(-,root,root,-)
6ca9083
%{_libdir}/libnco*.a
Ed Hill 8653ce0
Ed Hill 8653ce0
%changelog
Orion Poplawski 70b9129
* Thu Jun 23 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.8-2
Orion Poplawski 70b9129
- Really enable netcdf4 support
Orion Poplawski 70b9129
Orion Poplawski 03f5b64
* Tue May 17 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.8-1
Orion Poplawski 03f5b64
- Update to 4.0.8
Orion Poplawski 03f5b64
Orion Poplawski 0a9e376
* Wed Apr 6 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.7-1
Orion Poplawski 0a9e376
- Update to 4.0.7
Orion Poplawski 0a9e376
fb115cf
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.6-4
fb115cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
fb115cf
Orion Poplawski 0583ee3
* Sun Feb 6 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.6-3
Orion Poplawski 0583ee3
- Rebuild with fixed hdf5 for netcdf4 support
Orion Poplawski 0583ee3
Orion Poplawski b2b8e6f
* Sat Feb 5 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.6-2
Orion Poplawski b2b8e6f
- Fixup more EL5 tests
Orion Poplawski b2b8e6f
Orion Poplawski 21b9b41
* Sat Feb 5 2011 - Orion Poplawski <orion@cora.nwra.com> - 4.0.6-1
Orion Poplawski 21b9b41
- Update to 4.0.6
Orion Poplawski 21b9b41
- Really only use libnc-dap for EL5
Orion Poplawski 21b9b41
Orion Poplawski e77af3a
* Thu Dec 16 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.5-3
Orion Poplawski e77af3a
- BR antlr-C++ on Fedora 14+
Orion Poplawski e77af3a
Orion Poplawski 5808293
* Mon Dec 13 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.5-2
Orion Poplawski 5808293
- Use libnc-dap only for EL5
Orion Poplawski 5808293
- Other EL5 fixes
Orion Poplawski 5808293
Orion Poplawski 5235aa7
* Fri Dec 10 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.5-1
Orion Poplawski 5235aa7
- Update to 4.0.5
Orion Poplawski 5235aa7
Orion Poplawski 73591e0
* Fri Oct 1 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.4-1
Orion Poplawski 73591e0
- Update to 4.0.4
Orion Poplawski 73591e0
Orion Poplawski 6b10f00
* Tue Sep 7 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.3-1
Orion Poplawski 6b10f00
- Update to 4.0.3
Orion Poplawski 6b10f00
- Rebase install_C_headers patch
Orion Poplawski 6b10f00
384d99d
* Mon Jun 28 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.2-1
384d99d
- Update to 4.0.2
384d99d
2764197
* Tue Apr 20 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.1-1
2764197
- Update to 4.0.1
2764197
6c53451
* Wed Jan 6 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.0-4
6c53451
- Enable netcdf4 support
6c53451
b67c305
* Wed Jan 6 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.0-3
b67c305
- Enable udunits2 support - add proper include path
b67c305
95451d4
* Wed Jan 6 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.0-2
95451d4
- Enable udunits2 support
95451d4
- Updated 4.0.0 tarball
95451d4
5c20e98
* Wed Jan 6 2010 - Orion Poplawski <orion@cora.nwra.com> - 4.0.0-1
5c20e98
- Update to 4.0.0
5c20e98
5c902cb
* Thu Nov 12 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.9-2
5c902cb
- Drop LIBS, linkage fixed in netcdf package
5c902cb
99d7830
* Wed Nov 11 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.9-1
99d7830
- Update to 3.9.9
99d7830
- Build against netcdf 4.1.0
d211781
- Add needed netcdf libraries to LIBS
99d7830
ed94ee3
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.8-2
ed94ee3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ed94ee3
0404d93
* Thu Apr 30 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.8-1
0404d93
- Update to 3.9.8
0404d93
- Update install headers patch
0404d93
272520f
* Mon Mar 30 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.7-2
272520f
- Drop include patch fixed in antlr 2.7.7-5
272520f
0b984cc
* Wed Mar 25 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.7-1
0b984cc
- Update to 3.9.7 - download tarball from nco site
0b984cc
- Add BR on gsl-devel to enable GSL support
0b984cc
- Force antlr detection to override bad configure test
0b984cc
- Rework install_C_headers patch to not require autotool run
0b984cc
- Report include patch upstream
0b984cc
Caolan McNamara 03c7904
* Fri Mar 06 2009 - Caolán McNamara <caolanm@redhat.com> - 3.9.5-5
Caolan McNamara 03c7904
- include cstdio for EOF
Caolan McNamara 03c7904
72a2057
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.5-4
72a2057
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
72a2057
91e225b
* Sun Dec 21 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-3
91e225b
- call libtoolize
91e225b
- remove unneeded dependencies on curl-devel, libxml2-devel, librx-devel
91e225b
- ship more documentation
91e225b
4f08918
* Thu Sep 11 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-2
4f08918
- rebuild for newer libnc-dap
4f08918
25c64ff
* Thu Jul 10 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-1
25c64ff
- update to 3.9.5
25c64ff
6ca9083
* Sat Mar  1 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.3-1
6ca9083
- update to 3.9.3
6ca9083
- separate static sub-package 
d8561ff
6c39ff7
* Mon Aug 27 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.9.1-1
6c39ff7
- Update to 3.9.1
6c39ff7
- Drop udunits patch no longer needed
6c39ff7
- Add BR libnc-dap-devel to enable DAP support
6c39ff7
- Add BR antlr
6c39ff7
- Add BR gawk
6c39ff7
Ed Hill 1a0ed27
* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-3
Ed Hill 1a0ed27
- br bison as well
Ed Hill 1a0ed27
Ed Hill 7bc9bd1
* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-2
Ed Hill 7bc9bd1
- buildrequire flex
Ed Hill 7bc9bd1
Ed Hill a4077b2
* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-1
Ed Hill a4077b2
- new upstream 3.1.5
Ed Hill a4077b2
Ed Hill 551e475
* Fri Apr 21 2006 Ed Hill <ed@eh3.com> - 3.1.2-1
Ed Hill 551e475
- update to new upstream 3.1.2
Ed Hill 551e475
Ed Hill 0184855
* Thu Feb 16 2006 Ed Hill <ed@eh3.com> - 3.0.2-2
Ed Hill 0184855
- rebuild for new gcc
Ed Hill 0184855
Ed Hill dea9b0a
* Mon Sep  5 2005 Ed Hill <ed@eh3.com> - 3.0.2-1
Ed Hill dea9b0a
- update to new upstream 3.0.2
Ed Hill dea9b0a
Ed Hill 88665c3
* Wed Aug  3 2005 Ed Hill <ed@eh3.com> - 3.0.1-4
Ed Hill 88665c3
- remove (hopefully only temporarily) opendap support
Ed Hill 88665c3
Ed Hill 8653ce0
* Thu Jul 21 2005 Ed Hill <ed@eh3.com> - 3.0.1-3
Ed Hill 8653ce0
- add LICENSE file
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Jul  9 2005 Ed Hill <ed@eh3.com> - 3.0.1-2
Ed Hill 8653ce0
- add BuildRequires: opendap-devel
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sun Jun 19 2005 Ed Hill <ed@eh3.com> - 3.0.1-1
Ed Hill 8653ce0
- update to upstream 3.0.1
Ed Hill 8653ce0
- comment & fixes for BuildRequires
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Apr 23 2005 Ed Hill <ed@eh3.com> - 3.0.0-2
Ed Hill 8653ce0
- add BuildRequires and fix CXXFLAGS per Tom Callaway
Ed Hill 8653ce0
- add udunits patch per Tom Callaway
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Apr 16 2005 Ed Hill <ed@eh3.com> - 3.0.0-1
Ed Hill 8653ce0
- update to ver 3.0.0
Ed Hill 8653ce0
- devel package fixes per D.M. Kaplan and M. Schwendt
Ed Hill 8653ce0
- fix info post/postun
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sun Dec  5 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.4
Ed Hill 8653ce0
- sync with netcdf-3.6.0beta6-0.fdr.0
Ed Hill 8653ce0
- split into devel and non-devel
Ed Hill 8653ce0
Ed Hill 8653ce0
* Wed Dec  1 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.3
Ed Hill 8653ce0
- sync with netcdf-0:3.5.1-0.fdr.11
Ed Hill 8653ce0
- added '-fpermissive' for GCC 3.4.2 warnings
Ed Hill 8653ce0
- added "Provides:nco-devel" for the headers and libs
Ed Hill 8653ce0
Ed Hill 8653ce0
* Mon Oct  4 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.2
Ed Hill 8653ce0
- Add some of Michael Schwendt's suggested INC/LIB path fixes and 
Ed Hill 8653ce0
  sync with the netcdf-3.5.1-0.fdr.10 dependency.
Ed Hill 8653ce0
Ed Hill 8653ce0
* Thu Sep 23 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.1
Ed Hill 8653ce0
- add NETCDF_INC and NETCDF_LIB to work on systems where old
Ed Hill 8653ce0
  versions of netcdf may exist in /usr/local
Ed Hill 8653ce0
Ed Hill 8653ce0
* Wed Sep  8 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.0
Ed Hill 8653ce0
- updated to ver 2.9.9
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Aug  7 2004 Ed Hill <eh3@mit.edu> - 0:2.9.8-0.fdr.0
Ed Hill 8653ce0
- updated to ver 2.9.8
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.2
6ca9083
- removed unneeded %%ifarch
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.1
6ca9083
- Add %%post,%%postun
Ed Hill 8653ce0
Ed Hill 8653ce0
* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.0
Ed Hill 8653ce0
- Initial working version
Ed Hill 8653ce0