File netcdf.spec of Package netcdf
#
# spec file for package netcdf (Version 4.0.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: netcdf
Summary: Library for Array Oriented Data Access
Version: 4.0.1
Release: 2
Group: System/Libraries
License: MIT License (or similar)
Url: http://www.unidata.ucar.edu/software/netcdf/
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}-strict-aliasing.patch
Patch1: %{name}-%{version}-dependencies.patch
Patch2: %{name}-%{version}-delete.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ gcc-fortran
PreReq: %install_info_prereq
%description
This library provides array-oriented data access for the languages C
and C++.
Authors:
--------
Glenn Davis
Russ Rew
Steve Emmerson
Harvey Davies <support@unidata.ucar.edu>
%package -n libnetcdf4
License: MIT License (or similar)
Summary: Library for Array Oriented Data Access
Group: Development/Libraries/C and C++
Requires: netcdf = %{version}
Provides: libnetcdf-4 = %{version}
Obsoletes: libnetcdf-4 < %{version}
%description -n libnetcdf4
This library provides array-oriented data access for the languages C
and C++.
Authors:
--------
Glenn Davis
Russ Rew
Steve Emmerson
Harvey Davies <support@unidata.ucar.edu>
%package -n libnetcdf-devel
License: MIT License (or similar)
Summary: Library for Array Oriented Data Access
Group: Development/Libraries/C and C++
Requires: libnetcdf4 = %{version}
Requires: pkgconfig
%description -n libnetcdf-devel
This library provides array-oriented data access for the languages C
and C++.
Authors:
--------
Glenn Davis
Russ Rew
Steve Emmerson
Harvey Davies <support@unidata.ucar.edu>
%prep
%setup -q
%patch0
%patch1
%patch2
%build
%configure \
--enable-shared \
--disable-static \
--with-pic \
CC=gcc CXX=g++ FC=gfortran \
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" FCFLAGS="$RPM_OPT_FLAGS"
make %{?jobs:-j %jobs}
%install
%makeinstall
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libnetcdf-devel
for i in netcdf-c netcdf-tutorial netcdf-f90 netcdf-f77 netcdf-install netcdf netcdf-cxx; do
%install_info --info-dir=%{_infodir} %{_infodir}/$i.info.gz
done
%postun -n libnetcdf-devel
for i in netcdf-c netcdf-tutorial netcdf-f90 netcdf-f77 netcdf-install netcdf netcdf-cxx; do
%install_info_delete --info-dir=%{_infodir} %{_infodir}/$i.info.gz
done
%post -n libnetcdf4 -p /sbin/ldconfig
%postun -n libnetcdf4 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYRIGHT README RELEASE_NOTES
%{_bindir}/*
%{_mandir}/man1/*
%files -n libnetcdf-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/netcdf.pc
%{_mandir}/man3/*
%{_infodir}/*
%files -n libnetcdf4
%defattr(-,root,root)
%{_libdir}/libnetcdf.so.*
%{_libdir}/libnetcdf_c++.so.*
%{_libdir}/libnetcdff.so.*
%changelog