3 %bcond_with hdf4 # HDF4 read support (needs hdf built with "--disable-netcdf")
4 %bcond_with pnetcdf # parallel I/O for classic CDF files using PnetCDF
5 %bcond_without tests # don't perform "make check"
6 # (note: tests need endoder-enabled szip)
7 %bcond_with tests_net # remote tests (Internet access required)
9 Summary: NetCDF: Network Common Data Form
10 Summary(pl.UTF-8): NetCDF: obsługa wspólnego sieciowego formatu danych
16 Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/%{name}-c-%{version}.tar.gz
17 # Source0-md5: 3e0a97e6abb9a989f8a8a2e395473597
18 Patch0: %{name}-hdf5-filter-fix.patch
19 URL: https://www.unidata.ucar.edu/software/netcdf/
20 BuildRequires: autoconf >= 2.59
21 BuildRequires: automake
22 BuildRequires: curl-devel
23 BuildRequires: doxygen
24 %{?with_hdf4:BuildRequires: hdf-devel >= 4}
25 BuildRequires: hdf5-devel >= 1.10.3
26 %{?with_hdf4:BuildRequires: libjpeg-devel}
27 BuildRequires: libstdc++-devel
28 BuildRequires: libtool >= 2:2.2
29 %{?with_pnetcdf:BuildRequires: parallel-netcdf-devel >= 1.6.0}
30 BuildRequires: sed >= 4.0
31 BuildRequires: szip-devel >= 2.1-2
32 BuildRequires: texinfo
33 %{?with_hdf4:Requires: hdf >= 4}
34 Requires: hdf5 >= 1.10.3
35 %{?with_pnetcdf:Requires: parallel-netcdf >= 1.6.0}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 NetCDF (network Common Data Form) is an interface for array-oriented
40 data access and a library that provides an implementation of the
41 interface. The netCDF library also defines a machine-independent
42 format for representing scientific data. Together, the interface,
43 library, and format support the creation, access, and sharing of
44 scientific data. The netCDF software was developed at the Unidata
45 Program Center in Boulder, Colorado.
47 This package contains C library.
49 %description -l pl.UTF-8
50 NetCDF (Network Common Data Form) jest interfejsem dostępu do danych
51 zorganizowanych w tablice. Biblioteka netCDF definiuje niezależny od
52 maszyny format reprezentowania danych naukowych. Interfejs oraz
53 biblioteka pozwalają na tworzenie, dostęp i współdzielenie danych.
54 NetCDF powstał w Unidata Program Center w Boulder, Colorado.
56 Ten pakiet zawiera bibliotekę dla C.
59 Summary: Header files for netCDF
60 Summary(pl.UTF-8): Pliki nagłówkowe netCDF
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
64 %{?with_hdf4:Requires: hdf-devel >= 4}
65 Requires: hdf5-devel >= 1.10.3
66 %{?with_pnetcdf:Requires: parallel-netcdf-devel >= 1.6.0}
70 Header files for netCDF - C interface.
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe do biblioteki netCDF - interfejs dla C.
76 Summary: NetCDF - static library
77 Summary(pl.UTF-8): Biblioteka statyczna netCDF
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{version}-%{release}
82 Static version of netCDF C library.
84 %description static -l pl.UTF-8
85 Statyczna wersja biblioteki netCDF dla C.
88 %setup -q -n %{name}-c-%{version}
91 %if %{without tests_net}
92 # assumes at least 2 processors are available via MPI
93 %{__sed} -i '/TESTS += run_pnetcdf_test.sh/d' nc_test/Makefile.am
102 %{?with_hdf4:CPPFLAGS="%{rpmcppflags} -I/usr/include/hdf"}
104 %{!?with_tests_net:--disable-dap-remote-tests} \
107 %{?with_hdf4:--enable-hdf4} \
109 %{?with_pnetcdf:--enable-pnetcdf}
111 # some substitutions are missing when using autotools
112 %{__sed} -i -e 's,@SHOW_DOXYGEN_TAG_LIST@,NO,' \
113 -e 's,@CMAKE_CURRENT_BINARY_DIR@,.,' \
114 -e 's,@SERVER_SIDE_SEARCH@,NO,' \
115 -e 's,@NC_ENABLE_DOXYGEN_PDF_OUTPUT@,NO,' \
125 rm -rf $RPM_BUILD_ROOT
128 DESTDIR=$RPM_BUILD_ROOT
130 # dlopened (by libhdf5)
131 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libh5bzip2.la
132 # obsoleted by pkg-config
133 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnetcdf.la
136 rm -rf $RPM_BUILD_ROOT
138 %post -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
142 %defattr(644,root,root,755)
143 %doc COPYRIGHT README.md RELEASE_NOTES.md
144 %attr(755,root,root) %{_bindir}/nccopy
145 %attr(755,root,root) %{_bindir}/ncdump
146 %attr(755,root,root) %{_bindir}/ncgen
147 %attr(755,root,root) %{_bindir}/ncgen3
148 %attr(755,root,root) %{_libdir}/libnetcdf.so.*.*.*
149 %attr(755,root,root) %ghost %{_libdir}/libnetcdf.so.18
150 %attr(755,root,root) %{_libdir}/libh5bzip2.so
151 %{_libdir}/libnetcdf.settings
152 %{_mandir}/man1/nccopy.1*
153 %{_mandir}/man1/ncdump.1*
154 %{_mandir}/man1/ncgen.1*
155 %{_mandir}/man1/ncgen3.1*
158 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_bindir}/nc-config
161 %attr(755,root,root) %{_libdir}/libnetcdf.so
162 %{_includedir}/netcdf.h
163 %{_includedir}/netcdf_aux.h
164 %{_includedir}/netcdf_dispatch.h
165 %{_includedir}/netcdf_filter.h
166 %{_includedir}/netcdf_mem.h
167 %{_includedir}/netcdf_meta.h
168 %{?with_pnetcdf:%{_includedir}/netcdf_par.h}
169 %{_pkgconfigdir}/netcdf.pc
170 %{_mandir}/man3/netcdf.3*
173 %defattr(644,root,root,755)
174 %{_libdir}/libnetcdf.a