]> git.pld-linux.org Git - SPECS.git/blob - netcdf.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / netcdf.spec
1 #
2 # Conditional build:
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)
8 #
9 Summary:        NetCDF: Network Common Data Form
10 Summary(pl.UTF-8):      NetCDF: obsługa wspólnego sieciowego formatu danych
11 Name:           netcdf
12 Version:        4.7.4
13 Release:        2
14 License:        BSD
15 Group:          Libraries
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)
37
38 %description
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.
46
47 This package contains C library.
48
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.
55
56 Ten pakiet zawiera bibliotekę dla C.
57
58 %package devel
59 Summary:        Header files for netCDF
60 Summary(pl.UTF-8):      Pliki nagłówkowe netCDF
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       curl-devel
64 %{?with_hdf4:Requires:  hdf-devel >= 4}
65 Requires:       hdf5-devel >= 1.10.3
66 %{?with_pnetcdf:Requires:       parallel-netcdf-devel >= 1.6.0}
67 Requires:       szip-devel
68
69 %description devel
70 Header files for netCDF - C interface.
71
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe do biblioteki netCDF - interfejs dla C.
74
75 %package static
76 Summary:        NetCDF - static library
77 Summary(pl.UTF-8):      Biblioteka statyczna netCDF
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static version of netCDF C library.
83
84 %description static -l pl.UTF-8
85 Statyczna wersja biblioteki netCDF dla C.
86
87 %prep
88 %setup -q -n %{name}-c-%{version}
89 %patch0 -p1
90
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
94 %endif
95
96 %build
97 %{__libtoolize}
98 %{__aclocal}
99 %{__autoconf}
100 %{__autoheader}
101 %{__automake}
102 %{?with_hdf4:CPPFLAGS="%{rpmcppflags} -I/usr/include/hdf"}
103 %configure \
104         %{!?with_tests_net:--disable-dap-remote-tests} \
105         --enable-dap \
106         --enable-doxygen \
107         %{?with_hdf4:--enable-hdf4} \
108         --enable-netcdf-4 \
109         %{?with_pnetcdf:--enable-pnetcdf}
110
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,' \
116         docs/Doxyfile
117
118 %{__make}
119
120 %if %{with tests}
121 %{__make} -j1 check
122 %endif
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT
129
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
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %post   -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
140
141 %files
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*
156
157 %files devel
158 %defattr(644,root,root,755)
159 %doc docs/html/*
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*
171
172 %files static
173 %defattr(644,root,root,755)
174 %{_libdir}/libnetcdf.a
This page took 0.607 seconds and 3 git commands to generate.