Blob Blame History Raw
Name:           nco
Version:        3.9.8
Release:        2%{?dist}
Summary:        Suite of programs for manipulating NetCDF/HDF4 files
Group:          Applications/Engineering
License:        GPLv3
URL:            http://nco.sourceforge.net/

Source0:        http://nco.sourceforge.net/src/nco-%{version}.tar.gz
Patch0:         nco-3.9.8-install_C_headers.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  bison, flex, gawk
BuildRequires:  netcdf-devel, libnc-dap-devel
BuildRequires:  udunits, udunits-devel
BuildRequires:  antlr
BuildRequires:  gsl-devel
BuildRequires:  texinfo-tex texinfo

%package devel
Summary:        Development files for NCO
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%package static
Summary:        Static libraries for NCO
Group:          Development/Libraries
Requires:       %{name}-devel = %{version}-%{release}

%description
The netCDF Operators, NCO, are a suite of command line programs known
as operators.  The operators facilitate manipulation and analysis of
self-describing data stored in the freely available netCDF and HDF
formats (http://www.unidata.ucar.edu/packages/netcdf and
http://hdf.ncsa.uiuc.edu, respectively).  Each NCO operator (e.g.,
ncks) takes netCDF or HDF input file(s), performs an operation (e.g.,
averaging, hyperslabbing, or renaming), and outputs a processed netCDF
file.  Although most users of netCDF and HDF data are involved in
scientific research, these data formats, and thus NCO, are generic and
are equally useful in fields from agriculture to zoology.  The NCO
User's Guide illustrates NCO use with examples from the field of
climate modeling and analysis.  The NCO homepage is
http://nco.sourceforge.net/.

%description devel
This package contains the NCO header and development files.

%description static
This package contains the NCO static libs.

%prep
%setup -q
%patch0 -p1 -b .install_C_headers

%build
# it is possible that the netcdf header file used is from libnc-dap
export CPPFLAGS=-I%{_includedir}/netcdf
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive -fPIC"
%configure HAVE_ANTLR=yes --disable-dependency-tracking --includedir=%{_includedir}/nco
make %{?_smp_mflags}
pushd doc
makeinfo --html --no-split nco.texi
make nco.pdf
popd

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_includedir}/nco
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir

%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/nco.info \
    %{_infodir}/dir 2>/dev/null || :

%postun
/sbin/ldconfig
if [ "$1" = 0 ]; then
  /sbin/install-info --delete %{_infodir}/nco.info \
    %{_infodir}/dir 2>/dev/null || :
fi

%files
%defattr(-,root,root,-)
%doc doc/README doc/LICENSE doc/rtfm.txt doc/nco.html doc/nco.pdf doc/nco.css
%doc doc/index.shtml doc/TODO doc/ChangeLog doc/nco.png doc/nco_news.shtml
%doc doc/nsf.png
%{_bindir}/*
%{_mandir}/*/*
%{_infodir}/*
%{_libdir}/libnco*[0-9]*.so

%files devel
%defattr(-,root,root,-)
%{_includedir}/nco/
%{_libdir}/libnco.so
%{_libdir}/libnco_c++.so

%files static
%defattr(-,root,root,-)
%{_libdir}/libnco*.a

%changelog
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Apr 30 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.8-1
- Update to 3.9.8
- Update install headers patch

* Mon Mar 30 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.7-2
- Drop include patch fixed in antlr 2.7.7-5

* Wed Mar 25 2009 - Orion Poplawski <orion@cora.nwra.com> - 3.9.7-1
- Update to 3.9.7 - download tarball from nco site
- Add BR on gsl-devel to enable GSL support
- Force antlr detection to override bad configure test
- Rework install_C_headers patch to not require autotool run
- Report include patch upstream

* Fri Mar 06 2009 - Caolán McNamara <caolanm@redhat.com> - 3.9.5-5
- include cstdio for EOF

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Dec 21 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-3
- call libtoolize
- remove unneeded dependencies on curl-devel, libxml2-devel, librx-devel
- ship more documentation

* Thu Sep 11 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-2
- rebuild for newer libnc-dap

* Thu Jul 10 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.5-1
- update to 3.9.5

* Sat Mar  1 2008 - Patrice Dumas <pertusus@free.fr> - 3.9.3-1
- update to 3.9.3
- separate static sub-package 

* Mon Aug 27 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.9.1-1
- Update to 3.9.1
- Drop udunits patch no longer needed
- Add BR libnc-dap-devel to enable DAP support
- Add BR antlr
- Add BR gawk

* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-3
- br bison as well

* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-2
- buildrequire flex

* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.1.5-1
- new upstream 3.1.5

* Fri Apr 21 2006 Ed Hill <ed@eh3.com> - 3.1.2-1
- update to new upstream 3.1.2

* Thu Feb 16 2006 Ed Hill <ed@eh3.com> - 3.0.2-2
- rebuild for new gcc

* Mon Sep  5 2005 Ed Hill <ed@eh3.com> - 3.0.2-1
- update to new upstream 3.0.2

* Wed Aug  3 2005 Ed Hill <ed@eh3.com> - 3.0.1-4
- remove (hopefully only temporarily) opendap support

* Thu Jul 21 2005 Ed Hill <ed@eh3.com> - 3.0.1-3
- add LICENSE file

* Sat Jul  9 2005 Ed Hill <ed@eh3.com> - 3.0.1-2
- add BuildRequires: opendap-devel

* Sun Jun 19 2005 Ed Hill <ed@eh3.com> - 3.0.1-1
- update to upstream 3.0.1
- comment & fixes for BuildRequires

* Sat Apr 23 2005 Ed Hill <ed@eh3.com> - 3.0.0-2
- add BuildRequires and fix CXXFLAGS per Tom Callaway
- add udunits patch per Tom Callaway

* Sat Apr 16 2005 Ed Hill <ed@eh3.com> - 3.0.0-1
- update to ver 3.0.0
- devel package fixes per D.M. Kaplan and M. Schwendt
- fix info post/postun

* Sun Dec  5 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.4
- sync with netcdf-3.6.0beta6-0.fdr.0
- split into devel and non-devel

* Wed Dec  1 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.3
- sync with netcdf-0:3.5.1-0.fdr.11
- added '-fpermissive' for GCC 3.4.2 warnings
- added "Provides:nco-devel" for the headers and libs

* Mon Oct  4 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.2
- Add some of Michael Schwendt's suggested INC/LIB path fixes and 
  sync with the netcdf-3.5.1-0.fdr.10 dependency.

* Thu Sep 23 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.1
- add NETCDF_INC and NETCDF_LIB to work on systems where old
  versions of netcdf may exist in /usr/local

* Wed Sep  8 2004 Ed Hill <eh3@mit.edu> - 0:2.9.9-0.fdr.0
- updated to ver 2.9.9

* Sat Aug  7 2004 Ed Hill <eh3@mit.edu> - 0:2.9.8-0.fdr.0
- updated to ver 2.9.8

* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.2
- removed unneeded %%ifarch

* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.1
- Add %%post,%%postun

* Sat Jul 17 2004 Ed Hill <eh3@mit.edu> - 0:2.9.7-0.fdr.0
- Initial working version