summaryrefslogtreecommitdiff
path: root/matio.spec
blob: 5c17c1717d35dd42c92e90c51bbb8be032c5c87d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#
# Conditional build:
%bcond_with	apidocs		# build and package API docs (withdrawn in 1.5)
%bcond_with	fortran		# Fortran interface (removed from 1.5 sources)
%bcond_without	hdf5		# HDF5-based MAT v7.3 files support
#
Summary:	MATIO - Matlab MAT file I/O library
Summary(pl.UTF-8):	MATIO - biblioteka wejścia/wyjścia do plików MAT (Matlaba)
Name:		matio
Version:	1.5.0
Release:	1
License:	BSD
Group:		Libraries
Source0:	http://downloads.sourceforge.net/matio/%{name}-%{version}.tar.gz
# Source0-md5:	42045916d470d038e4141b37bf33ca20
Patch0:		%{name}-link.patch
URL:		http://matio.sourceforge.net/
BuildRequires:	autoconf >= 2.59
BuildRequires:	automake >= 1:1.8
%{?with_apidocs:BuildRequires:	doxygen}
%{?with_fortran:BuildRequires:	gcc-fortran}
%{?with_hdf5:BuildRequires:	hdf5-devel}
BuildRequires:	libtool >= 2:1.5
BuildRequires:	sed >= 4.0
BuildRequires:	zlib-devel
%if %{with apidocs}
BuildRequires:	doxygen
BuildRequires:	texlive-format-pdflatex
BuildRequires:	texlive-latex-ams
BuildRequires:	texlive-makeindex
%endif
Obsoletes:	matio-apidocs
Obsoletes:	matio-fortran
Obsoletes:	matio-fortran-devel
Obsoletes:	matio-fortran-static
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
libmatio is an open-source library for reading/writing Matlab MAT
files. This library is designed for use by programs/libraries that do
not have access or do not want to rely on Matlab's libmat shared
library.

%description -l pl.UTF-8
libmatio to mająca otwarte źródłą biblioteka do odczytu i zapisu
plików MAT (z programu Matlab). Jest przeznaczona dla programów i
bibliotek nie mających dostępu albo nie chcących polegać na bibliotece
współdzielonej libmat z Matlaba.

%package devel
Summary:	Header files for MATIO library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki MATIO
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
%{?with_hdf5:Requires:	hdf5-devel}
Requires:	zlib-devel

%description devel
Header files for MATIO library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki MATIO.

%package static
Summary:	Static MATIO library
Summary(pl.UTF-8):	Statyczna biblioteka MATIO
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static MATIO library.

%description static -l pl.UTF-8
Statyczna biblioteka MATIO.

%package fortran
Summary:	Fortran interface for MATIO library
Summary(pl.UTF-8):	Interfejs Fortranu do biblioteki MATIO
Group:		Libraries
Requires:	%{name} = %{version}-%{release}

%description fortran
Fortran interface for MATIO library.

%description fortran -l pl.UTF-8
Interfejs Fortranu do biblioteki MATIO.

%package fortran-devel
Summary:	Header file for Fortran interface for MATIO library
Summary(pl.UTF-8):	Plik nagłówkowy interfejsu Fortranu do biblioteki MATIO
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}
Requires:	%{name}-fortran = %{version}-%{release}

%description fortran-devel
Header file for Fortran interface for MATIO library.

%description fortran-devel -l pl.UTF-8
Plik nagłówkowy interfejsu Fortranu do biblioteki MATIO.

%package fortran-static
Summary:	Fortran interface for MATIO library - static library
Summary(pl.UTF-8):	Interfejs Fortranu do biblioteki MATIO - biblioteka statyczna
Group:		Development/Libraries
Requires:	%{name}-fortran-devel = %{version}-%{release}

%description fortran-static
Fortran interface for MATIO library - static library.

%description fortran-static -l pl.UTF-8
Interfejs Fortranu do biblioteki MATIO - biblioteka statyczna.

%package apidocs
Summary:	MATIO API documentation
Summary(pl.UTF-8):	Dokumentacja API biblioteki MATIO
Group:		Documentation

%description apidocs
API and internal documentation for MATIO library.

%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki MATIO.

%prep
%setup -q
%patch0 -p1

%build
%{__libtoolize}
%{__aclocal} -I config
%{__autoconf}
%{__automake}
%configure \
	%{?with_fortran:--enable-fortran} \
	%{!?with_hdf5:--disable-mat73} \
	--enable-shared

%{__make}

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc COPYING NEWS README
%attr(755,root,root) %{_bindir}/matdump
%attr(755,root,root) %{_libdir}/libmatio.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libmatio.so.2

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libmatio.so
%{_libdir}/libmatio.la
%{_includedir}/matio*.h
%{_pkgconfigdir}/matio.pc
%{_mandir}/man3/Mat_*.3*

%files static
%defattr(644,root,root,755)
%{_libdir}/libmatio.a

%if %{with fortran}
%files fortran
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libmatio-fortran.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libmatio-fortran.so.2

%files fortran-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libmatio-fortran.so
%{_libdir}/libmatio-fortran.la
%{_includedir}/matio.mod

%files fortran-static
%defattr(644,root,root,755)
%{_libdir}/libmatio-fortran.a
%endif

%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%doc doxygen/latex/libmatio.pdf
%endif