3 %bcond_without f2003 # Fortran 2003 interface (beside F77/F90)
4 %bcond_without static_libs # static library
5 %bcond_without tests # unit tests (require encoder-enabled szip)
7 Summary: NetCDF Fortran library
8 Summary(pl.UTF-8): Biblioteka NetCDF dla języka Fortran
14 Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/%{name}-%{version}.tar.gz
15 # Source0-md5: 10cfce1ed4f474af30dbbad076b085d2
16 Patch0: %{name}-f90.patch
17 URL: https://www.unidata.ucar.edu/software/netcdf/
18 BuildRequires: autoconf >= 2.59
19 BuildRequires: automake >= 1:1.13
21 BuildRequires: gcc-fortran >= 6:4.4
23 BuildRequires: gcc-fortran >= 5:4.0
25 BuildRequires: libtool >= 2:2.2
26 BuildRequires: netcdf-devel >= 4.7.4
27 BuildRequires: texinfo
28 Requires: netcdf >= 4.7.4
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 NetCDF (network Common Data Form) is an interface for array-oriented
34 data access and a library that provides an implementation of the
35 interface. The netCDF library also defines a machine-independent
36 format for representing scientific data. Together, the interface,
37 library, and format support the creation, access, and sharing of
38 scientific data. The netCDF software was developed at the Unidata
39 Program Center in Boulder, Colorado.
41 This package contains Fortran 77%{?with_f90: and 90} library.
43 %description -l pl.UTF-8
44 NetCDF (Network Common Data Form) jest interfejsem dostępu do danych
45 zorganizowanych w tablice. Biblioteka netCDF definiuje niezależny od
46 maszyny format reprezentowania danych naukowych. Interfejs oraz
47 biblioteka pozwalają na tworzenie, dostęp i współdzielenie danych.
48 NetCDF powstał w Unidata Program Center w Boulder, Colorado.
50 Ten pakiet zawiera bibliotekę dla języka Fortran 77%{?with_f90: i 90}.
53 Summary: Header files for netCDF Fortran interface
54 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu netCDF dla języka Fortran
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
58 Requires: gcc-fortran >= 6:4.4
60 Requires: gcc-fortran >= 5:4.0
62 Requires: netcdf-devel >= 4.7.4
63 Obsoletes: netcdf-f90-devel
66 Header files for netCDF - Fortran interface.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki netCDF - interfejs dla języka Fortran.
72 Summary: NetCDF Fortran static library
73 Summary(pl.UTF-8): Biblioteka statyczna netCDF dla języka Fortran
74 Group: Development/Libraries
75 Requires: %{name}-devel = %{version}-%{release}
76 Obsoletes: netcdf-f90-static
79 Static version of netCDF Fortran library.
81 %description static -l pl.UTF-8
82 Statyczna wersja biblioteki netCDF dla języka Fortran.
93 %define gfortran_version %(gfortran -dumpversion)
94 CPPFLAGS="%{rpmcppflags} -DgFortran=1"
96 %if "%{_ver_ge '%{gfortran_version}' '10.0'}" == "1"
97 FCFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
98 FFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
100 FCFLAGS="%{rpmcflags}" \
102 %{!?with_f2003:--disable-f03} \
103 %{!?with_static_libs:--disable-static}
112 rm -rf $RPM_BUILD_ROOT
115 DESTDIR=$RPM_BUILD_ROOT
117 # obsoleted by pkg-config
118 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnetcdff.la
121 rm -rf $RPM_BUILD_ROOT
123 %post -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
126 %post devel -p /sbin/postshell
127 -/usr/sbin/fix-info-dir -c %{_infodir}
129 %postun devel -p /sbin/postshell
130 -/usr/sbin/fix-info-dir -c %{_infodir}
133 %defattr(644,root,root,755)
134 %doc COPYRIGHT README.md RELEASE_NOTES.md
135 %attr(755,root,root) %{_libdir}/libnetcdff.so.*.*.*
136 %attr(755,root,root) %ghost %{_libdir}/libnetcdff.so.7
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_bindir}/nf-config
141 %attr(755,root,root) %{_libdir}/libnetcdff.so
142 %{_libdir}/libnetcdff.settings
143 %{_includedir}/netcdf.inc
144 %{_includedir}/netcdf*.mod
145 %{_includedir}/typesizes.mod
146 %{_pkgconfigdir}/netcdf-fortran.pc
147 %{_mandir}/man3/netcdf_f77.3*
148 %{_mandir}/man3/netcdf_fortran.3*
150 %if %{with static_libs}
152 %defattr(644,root,root,755)
153 %{_libdir}/libnetcdff.a