Ed Hill 8653ce0
Name:           nco
0b984cc
Version:        3.9.7
272520f
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
0b984cc
Patch0:         nco-3.9.7-install_C_headers.patch
Ed Hill 8653ce0
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Ed Hill 8653ce0
6c39ff7
BuildRequires:  bison, flex, gawk
6c39ff7
BuildRequires:  netcdf-devel, libnc-dap-devel
Ed Hill 88665c3
BuildRequires:  udunits, udunits-devel
6c39ff7
BuildRequires:  antlr
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
Ed Hill 8653ce0
Ed Hill 8653ce0
%build
91e225b
# it is possible that the netcdf header file used is from libnc-dap
91e225b
export CPPFLAGS=-I%{_includedir}/netcdf
Ed Hill 8653ce0
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
Ed Hill 8653ce0
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive -fPIC"
0b984cc
%configure HAVE_ANTLR=yes --disable-dependency-tracking --includedir=%{_includedir}/nco
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
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
03c7904
* Fri Mar 06 2009 - Caolán McNamara <caolanm@redhat.com> - 3.9.5-5
03c7904
- include cstdio for EOF
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