]> git.pld-linux.org Git - SPECS.git/blob - netcdf-fortran.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / netcdf-fortran.spec
1 #
2 # Conditional build:
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)
6 #
7 Summary:        NetCDF Fortran library
8 Summary(pl.UTF-8):      Biblioteka NetCDF dla języka Fortran
9 Name:           netcdf-fortran
10 Version:        4.5.3
11 Release:        2
12 License:        BSD-like
13 Group:          Libraries
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
20 %if %{with f2003}
21 BuildRequires:  gcc-fortran >= 6:4.4
22 %else
23 BuildRequires:  gcc-fortran >= 5:4.0
24 %endif
25 BuildRequires:  libtool >= 2:2.2
26 BuildRequires:  netcdf-devel >= 4.7.4
27 BuildRequires:  texinfo
28 Requires:       netcdf >= 4.7.4
29 Obsoletes:      netcdf-f90
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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.
40
41 This package contains Fortran 77%{?with_f90: and 90} library.
42
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.
49
50 Ten pakiet zawiera bibliotekę dla języka Fortran 77%{?with_f90: i 90}.
51
52 %package devel
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}
57 %if %{with f2003}
58 Requires:       gcc-fortran >= 6:4.4
59 %else
60 Requires:       gcc-fortran >= 5:4.0
61 %endif
62 Requires:       netcdf-devel >= 4.7.4
63 Obsoletes:      netcdf-f90-devel
64
65 %description devel
66 Header files for netCDF - Fortran interface.
67
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki netCDF - interfejs dla języka Fortran.
70
71 %package static
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
77
78 %description static
79 Static version of netCDF Fortran library.
80
81 %description static -l pl.UTF-8
82 Statyczna wersja biblioteki netCDF dla języka Fortran.
83
84 %prep
85 %setup -q
86 %patch0 -p1
87
88 %build
89 %{__libtoolize}
90 %{__aclocal} -I m4
91 %{__autoconf}
92 %{__automake}
93 %define gfortran_version        %(gfortran -dumpversion)
94 CPPFLAGS="%{rpmcppflags} -DgFortran=1"
95 %configure \
96 %if "%{_ver_ge '%{gfortran_version}' '10.0'}" == "1"
97         FCFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
98         FFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
99 %else
100         FCFLAGS="%{rpmcflags}" \
101 %endif
102         %{!?with_f2003:--disable-f03} \
103         %{!?with_static_libs:--disable-static}
104
105 %{__make}
106
107 %if %{with tests}
108 %{__make} -j1 check
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %{__make} install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 # obsoleted by pkg-config
118 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnetcdff.la
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post   -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
125
126 %post   devel -p /sbin/postshell
127 -/usr/sbin/fix-info-dir -c %{_infodir}
128
129 %postun devel -p /sbin/postshell
130 -/usr/sbin/fix-info-dir -c %{_infodir}
131
132 %files
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
137
138 %files devel
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*
149
150 %if %{with static_libs}
151 %files static
152 %defattr(644,root,root,755)
153 %{_libdir}/libnetcdff.a
154 %endif
This page took 0.12304 seconds and 3 git commands to generate.