6dc1970
Name:           netcdf
Ed Hill 205af58
Version:        3.6.1
Ed Hill 9d62b30
Release:        3%{?dist}
e678fea
Summary:        Libraries for the Unidata network Common Data Form (NetCDF v3)
6dc1970
6dc1970
Group:          Applications/Engineering
6dc1970
License:        NetCDF
6dc1970
URL:            http://my.unidata.ucar.edu/content/software/netcdf/index.html
Ed Hill 205af58
Source0:        ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.1.tar.gz
6dc1970
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6dc1970
Ed Hill fc0e992
BuildRequires:  gcc-gfortran
Ed Hill 9fd562b
BuildRequires:  compat-gcc-32-g77
6dc1970
e678fea
%package devel
e678fea
Summary:        Development files for netcdf-3
e678fea
Group:          Development/Libraries
Ed Hill cb16c38
Requires:       %{name} = %{version}-%{release}
6dc1970
6dc1970
%description
e678fea
NetCDF-3 (network Common Data Form ver3) is an interface for
e678fea
array-oriented data access and a freely-distributed collection of
e678fea
software libraries for C, Fortran, C++, and perl that provides an
e678fea
implementation of the interface.  The NetCDF library also defines a
e678fea
machine-independent format for representing scientific data. Together,
e678fea
the interface, library, and format support the creation, access, and
e678fea
sharing of scientific data. The NetCDF software was developed at the
e678fea
Unidata Program Center in Boulder, Colorado.
6dc1970
Ed Hill fc0e992
NetCDF data is: 
6dc1970
6dc1970
   o Self-Describing: A NetCDF file includes information about the
6dc1970
     data it contains.
6dc1970
6dc1970
   o Network-transparent:  A NetCDF file is represented in a form that
6dc1970
     can be accessed by computers with different ways of storing
6dc1970
     integers, characters, and floating-point numbers.
6dc1970
6dc1970
   o Direct-access:  A small subset of a large dataset may be accessed
6dc1970
     efficiently, without first reading through all the preceding
6dc1970
     data.
6dc1970
6dc1970
   o Appendable:  Data can be appended to a NetCDF dataset along one
6dc1970
     dimension without copying the dataset or redefining its
6dc1970
     structure. The structure of a NetCDF dataset can be changed,
6dc1970
     though this sometimes causes the dataset to be copied.
6dc1970
6dc1970
   o Sharable:  One writer and multiple readers may simultaneously
6dc1970
     access the same NetCDF file.
6dc1970
e678fea
%description devel
e678fea
This package contains the netCDF-3 header files, static libs, and man
e678fea
pages.
e678fea
6dc1970
6dc1970
%prep
Ed Hill 205af58
%setup -q
6dc1970
6dc1970
6dc1970
%build
Ed Hill fc0e992
cd src
Ed Hill 205af58
export FC="g77"
Ed Hill 205af58
export F90=
Ed Hill 205af58
export CPPFLAGS="-fPIC -Df2cFortran"
Ed Hill e28ddb8
export FFLAGS="-fPIC"
6dc1970
%configure
6dc1970
#  WARNING!
6dc1970
#  The parallel build was tested and it does NOT work.
6dc1970
#  make %{?_smp_mflags}
6dc1970
make
Ed Hill 60004a2
mkdir lib_g77
Ed Hill 60004a2
cp libsrc/libnetcdf.a lib_g77
Ed Hill 60004a2
make clean
Ed Hill 205af58
export FC="gfortran"
Ed Hill 205af58
export F90="gfortran"
Ed Hill 205af58
export CPPFLAGS="-fPIC -DpgiFortran"
Ed Hill 60004a2
%configure
Ed Hill 60004a2
make
Ed Hill 60004a2
#  The below seems to work but I worry that it would lead to odd runtime
Ed Hill 60004a2
#  errors due to possible symbol collisions in the "cfortran.h" bits.  
Ed Hill 60004a2
#  The safer thing to do is to simply build and install two libraries,  
Ed Hill 60004a2
#  one for the older g77 and one for gfortran.
Ed Hill 60004a2
#    ar cru libsrc/libnetcdf.a lib_g77/libnetcdf.a
Ed Hill cb16c38
unset FC
Ed Hill 205af58
unset F90
Ed Hill cb16c38
unset CPPFLAGS
Ed Hill e28ddb8
unset FFLAGS
6dc1970
6dc1970
%install
Ed Hill cb16c38
rm -rf ${RPM_BUILD_ROOT}
Ed Hill cb16c38
mkdir ${RPM_BUILD_ROOT}
Ed Hill cb16c38
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3
Ed Hill cb16c38
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3
Ed Hill cb16c38
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}
Ed Hill cb16c38
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}
Ed Hill fc0e992
cd src
e678fea
%makeinstall INCDIR=${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 \
e678fea
  LIBDIR=${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 \
Ed Hill cb16c38
  MANDIR=${RPM_BUILD_ROOT}%{_mandir}
Ed Hill 60004a2
cp lib_g77/libnetcdf.a ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3/libnetcdf_g77.a
Ed Hill cb16c38
rm -rf ${RPM_BUILD_ROOT}%{_mandir}/man3f*
Ed Hill fc0e992
find ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 -type f | xargs chmod 644
Ed Hill fc0e992
find ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 -type f | xargs chmod 644
Ed Hill cb16c38
find ${RPM_BUILD_ROOT}%{_mandir} -type f | xargs chmod 644
6dc1970
6dc1970
%clean
Ed Hill cb16c38
rm -rf ${RPM_BUILD_ROOT}
6dc1970
6dc1970
6dc1970
%files
6dc1970
%defattr(-,root,root,-)
Ed Hill fc0e992
%doc src/COPYRIGHT src/README
6dc1970
%{_bindir}/*
e678fea
%{_mandir}/man1/*
e678fea
e678fea
%files devel
e678fea
%defattr(-,root,root,-)
e678fea
%{_includedir}/netcdf-3
e678fea
%{_libdir}/netcdf-3
e678fea
%{_mandir}/man3/*
6dc1970
6dc1970
6dc1970
%changelog
Ed Hill 9d62b30
* Sat Sep  2 2006 Ed Hill <ed@eh3.com> - 3.6.1-3
Ed Hill 9d62b30
- rebuild for imminent FC-6 release
Ed Hill 9d62b30
Ed Hill 9fd562b
* Thu May 11 2006 Ed Hill <ed@eh3.com> - 3.6.1-2
Ed Hill 9fd562b
- add missing BuildRequires for the g77 interface
Ed Hill 9fd562b
Ed Hill 205af58
* Fri Apr 21 2006 Ed Hill <ed@eh3.com> - 3.6.1-1
Ed Hill 205af58
- update to upstream 3.6.1
Ed Hill 205af58
Ed Hill 20e1260
* Thu Feb 16 2006 Ed Hill <ed@eh3.com> - 3.6.0-10.p1
Ed Hill 20e1260
- rebuild for new GCC
Ed Hill 20e1260
df9acd5
* Thu Dec 22 2005 Orion Poplawski <orion@cora.nwra.com> - 3.6.0-9.p1
df9acd5
- rebuild for gcc4.1
df9acd5
Ed Hill 60004a2
* Sun Oct 16 2005 Ed Hill <ed@eh3.com> - 3.6.0-8.p1
Ed Hill 60004a2
- building the library twice (once each for g77 and gfortran) 
Ed Hill 60004a2
  fixes an annoying problem for people who need both compilers
Ed Hill 60004a2
Ed Hill e28ddb8
* Fri Sep 29 2005 Ed Hill <ed@eh3.com> - 3.6.0-7.p1
Ed Hill e28ddb8
- add FFLAGS="-fPIC"
Ed Hill e28ddb8
Ed Hill 8f3ae26
* Fri Jun 13 2005 Ed Hill <ed@eh3.com> - 3.6.0-6.p1
Ed Hill 8f3ae26
- rebuild
Ed Hill 8f3ae26
Ed Hill cb2c3a4
* Fri Jun  3 2005 Ed Hill <ed@eh3.com> - 3.6.0-5.p1
Ed Hill cb2c3a4
- bump for the build system
Ed Hill cb2c3a4
Ed Hill 43a7896
* Mon May  9 2005 Ed Hill <ed@eh3.com> - 3.6.0-4.p1
Ed Hill 43a7896
- remove hard-coded dist/fedora macros
Ed Hill 43a7896
Ed Hill cb16c38
* Wed May  5 2005 Ed Hill <ed@eh3.com> - 3.6.0-3.p1
Ed Hill cb16c38
- make netcdf-devel require netcdf (bug #156748)
Ed Hill cb16c38
- cleanup environment and paths
Ed Hill cb16c38
Ed Hill fc0e992
* Tue Apr  5 2005 Ed Hill <ed@eh3.com> - 0:3.6.0-2.p1
Ed Hill fc0e992
- update for gcc-gfortran
Ed Hill fc0e992
- fix file permissions
Ed Hill fc0e992
Ed Hill fc0e992
* Sat Mar  5 2005 Ed Hill <ed@eh3.com> - 0:3.6.0-1.p1
Ed Hill fc0e992
- update for 3.6.0-p1 large-files-bug fix and remove the Epoch
Ed Hill fc0e992
e678fea
* Sun Dec 12 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0-0.2.beta6
e678fea
- fix naming scheme for pre-releases (per Michael Schwendt)
e678fea
e678fea
* Sat Dec 11 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.2
e678fea
- For Fortran, use only g77 (ignore gfortran, even if its installed)
e678fea
e678fea
* Tue Dec  7 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.1
e678fea
- remove "BuildRequires: gcc4-gfortran"
e678fea
e678fea
* Sat Dec  4 2004 Ed Hill <eh3@mit.edu> - 0:3.6.0beta6-0.fdr.0
e678fea
- upgrade to 3.6.0beta6
Ed Hill fc0e992
- create separate devel package that does *not* depend upon 
Ed Hill fc0e992
  the non-devel package and put the headers/libs in "netcdf-3" 
e678fea
  subdirs for easy co-existance with upcoming netcdf-4
e678fea
e678fea
* Thu Dec  2 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.12
e678fea
- remove unneeded %configure flags
e678fea
e678fea
* Wed Dec  1 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.11
e678fea
- headers in /usr/include/netcdf, libs in /usr/lib/netcdf
e678fea
e678fea
* Mon Oct  4 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.10
Ed Hill fc0e992
- Put headers in their own directory but leave the libraries in the 
e678fea
  %{_libdir} -- there are only two libs and the majority of other
e678fea
  "*-devel" packages follow this pattern
e678fea
e678fea
* Sun Oct  3 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:3.5.1-0.fdr.9
e678fea
- add patch to install lib and headers into own tree
e678fea
6dc1970
* Sun Aug  1 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.8
6dc1970
- added -fPIC so x86_64 build works with nco package
6dc1970
6dc1970
* Fri Jul 30 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.7
6dc1970
- fix typo in the x86_64 build and now works on x86_64
6dc1970
6dc1970
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.6
6dc1970
- fix license
6dc1970
6dc1970
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.5
6dc1970
- fix (hopefully?) x86_64 /usr/lib64 handling
6dc1970
6dc1970
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.4
6dc1970
- replace paths with macros
6dc1970
6dc1970
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.3
6dc1970
- fix spelling
6dc1970
6dc1970
* Thu Jul 15 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.2
6dc1970
- removed "--prefix=/usr" from %configure
6dc1970
6dc1970
* Wed Jul 14 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.1
6dc1970
- Remove unnecessary parts and cleanup for submission
6dc1970
6dc1970
* Wed Jul 14 2004 Ed Hill <eh3@mit.edu> - 0:3.5.1-0.fdr.0
6dc1970
- Initial RPM release.