]>
Commit | Line | Data |
---|---|---|
7fdffc73 JB |
1 | # |
2 | # Conditional build: | |
4d0bb355 JB |
3 | %bcond_without static_libs # static library |
4 | %bcond_without tests # unit tests (encoder-enabled szip required) | |
7fdffc73 JB |
5 | # |
6 | Summary: NetCDF C++ library | |
7 | Summary(pl.UTF-8): Biblioteka NetCDF dla języka C++ | |
8 | Name: netcdf-cxx4 | |
4d0bb355 | 9 | Version: 4.3.1 |
a1a97c42 | 10 | Release: 2 |
7fdffc73 JB |
11 | License: BSD-like |
12 | Group: Libraries | |
13 | Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/%{name}-%{version}.tar.gz | |
4d0bb355 JB |
14 | # Source0-md5: 19cccc27a24fc9095ddbe84bf90ebc83 |
15 | Patch0: %{name}-link.patch | |
a1a97c42 | 16 | URL: https://www.unidata.ucar.edu/software/netcdf/ |
7fdffc73 JB |
17 | BuildRequires: autoconf >= 2.66 |
18 | BuildRequires: automake | |
19 | BuildRequires: libstdc++-devel | |
20 | BuildRequires: libtool >= 2:2.2 | |
4d0bb355 | 21 | BuildRequires: netcdf-devel >= 4.6.0 |
7fdffc73 | 22 | BuildRequires: texinfo |
4d0bb355 | 23 | Requires: netcdf >= 4.6.0 |
7fdffc73 JB |
24 | Obsoletes: netcdf-c++ |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | NetCDF (network Common Data Form) is an interface for array-oriented | |
29 | data access and a library that provides an implementation of the | |
30 | interface. The netCDF library also defines a machine-independent | |
31 | format for representing scientific data. Together, the interface, | |
32 | library, and format support the creation, access, and sharing of | |
33 | scientific data. The netCDF software was developed at the Unidata | |
34 | Program Center in Boulder, Colorado. | |
35 | ||
36 | This package contains C++ library. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | NetCDF (Network Common Data Form) jest interfejsem dostępu do danych | |
40 | zorganizowanych w tablice. Biblioteka netCDF definiuje niezależny od | |
41 | maszyny format reprezentowania danych naukowych. Interfejs oraz | |
42 | biblioteka pozwalają na tworzenie, dostęp i współdzielenie danych. | |
43 | NetCDF powstał w Unidata Program Center w Boulder, Colorado. | |
44 | ||
45 | Ten pakiet zawiera bibliotekę dla języka C++. | |
46 | ||
47 | %package devel | |
48 | Summary: Header files for netCDF C++ interface | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe interfejsu netCDF dla języka C++ | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | Requires: libstdc++-devel | |
4d0bb355 | 53 | Requires: netcdf-devel >= 4.6.0 |
7fdffc73 JB |
54 | Obsoletes: netcdf-c++-devel |
55 | ||
56 | %description devel | |
57 | Header files for netCDF - C++ interface. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki netCDF - interfejs dla języka C++. | |
61 | ||
62 | %package static | |
63 | Summary: NetCDF C++ static library | |
64 | Summary(pl.UTF-8): Biblioteka statyczna netCDF dla języka C++ | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | Obsoletes: netcdf-c++-static | |
68 | ||
69 | %description static | |
70 | Static version of netCDF C++ library. | |
71 | ||
72 | %description static -l pl.UTF-8 | |
73 | Statyczna wersja biblioteki netCDF dla języka C++. | |
74 | ||
75 | %prep | |
76 | %setup -q | |
4d0bb355 | 77 | %patch0 -p1 |
7fdffc73 JB |
78 | |
79 | %build | |
80 | %{__libtoolize} | |
81 | %{__aclocal} -I m4 | |
82 | %{__autoconf} | |
83 | %{__autoheader} | |
84 | %{__automake} | |
4d0bb355 JB |
85 | %configure \ |
86 | %{!?with_static_libs:--disable-static} | |
7fdffc73 JB |
87 | |
88 | %{__make} | |
89 | ||
90 | %if %{with tests} | |
7128a7b9 | 91 | %{__make} -j1 check |
7fdffc73 JB |
92 | %endif |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %{__make} install \ | |
98 | DESTDIR=$RPM_BUILD_ROOT | |
99 | ||
4d0bb355 JB |
100 | # bzip2 plugin packaged in base netcdf |
101 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libh5bzip2.* | |
102 | # obsoleted by pkg-config | |
103 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnetcdf_c++4.la | |
104 | ||
7fdffc73 JB |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %post -p /sbin/ldconfig | |
109 | %postun -p /sbin/ldconfig | |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
4d0bb355 | 113 | %doc COPYRIGHT README.md RELEASE_NOTES.md |
7fdffc73 JB |
114 | %attr(755,root,root) %{_libdir}/libnetcdf_c++4.so.*.*.* |
115 | %attr(755,root,root) %ghost %{_libdir}/libnetcdf_c++4.so.1 | |
116 | ||
117 | %files devel | |
118 | %defattr(644,root,root,755) | |
119 | %attr(755,root,root) %{_bindir}/ncxx4-config | |
120 | %attr(755,root,root) %{_libdir}/libnetcdf_c++4.so | |
7fdffc73 JB |
121 | %{_includedir}/ncAtt.h |
122 | %{_includedir}/ncByte.h | |
123 | %{_includedir}/ncChar.h | |
124 | %{_includedir}/ncCheck.h | |
125 | %{_includedir}/ncCompoundType.h | |
126 | %{_includedir}/ncDim.h | |
127 | %{_includedir}/ncDouble.h | |
128 | %{_includedir}/ncEnumType.h | |
129 | %{_includedir}/ncException.h | |
130 | %{_includedir}/ncFile.h | |
131 | %{_includedir}/ncFloat.h | |
132 | %{_includedir}/ncGroup.h | |
133 | %{_includedir}/ncGroupAtt.h | |
134 | %{_includedir}/ncInt.h | |
135 | %{_includedir}/ncInt64.h | |
136 | %{_includedir}/ncOpaqueType.h | |
137 | %{_includedir}/ncShort.h | |
138 | %{_includedir}/ncString.h | |
139 | %{_includedir}/ncType.h | |
140 | %{_includedir}/ncUbyte.h | |
141 | %{_includedir}/ncUint.h | |
142 | %{_includedir}/ncUint64.h | |
143 | %{_includedir}/ncUshort.h | |
144 | %{_includedir}/ncVar.h | |
145 | %{_includedir}/ncVarAtt.h | |
146 | %{_includedir}/ncVlenType.h | |
147 | %{_includedir}/netcdf | |
148 | %{_pkgconfigdir}/netcdf-cxx4.pc | |
149 | ||
4d0bb355 | 150 | %if %{with static_libs} |
7fdffc73 JB |
151 | %files static |
152 | %defattr(644,root,root,755) | |
153 | %{_libdir}/libnetcdf_c++4.a | |
4d0bb355 | 154 | %endif |