Name: matio
Version: 1.3.4
Release: 1%{?dist}
Summary: Library for reading/writing Matlab MAT files
Group: System Environment/Libraries
License: LGPLv2+
URL: http://sourceforge.net/projects/matio
Source0: http://downloads.sourceforge.net/matio/matio-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: doxygen
BuildRequires: gcc-gfortran
#According to the README - zlib 1.2.2 is possible but require a patch
BuildRequires: zlib-devel >= 1.2.3
%description
matio 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.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: zlib-devel
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
#Doxygen
pushd doxygen
doxygen -u doxygen.config
#Fake the pdf creation
mkdir -p latex
touch latex/refman.pdf
popd
%build
export FCFLAGS=$RPM_OPT_FLAGS
%configure \
--enable-shared \
--disable-static \
--enable-fortran \
--enable-extended-sparse=yes \
--enable-test=no \
--enable-docs=yes
# remove rpath from libtool
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
#Parallele make fails with
#make[2]: *** No rule to make target `../src/matio.mod', needed by `all-am'. Stop.
#{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
#Remove pdf - really needed along with doxygen ?
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/matio/libmatio.pdf
#Fix html docs timestramps generation.
for f in $(find doxygen/html -type f); do
touch -r doxygen/Makefile.am ${f}
done
#Fix location of Fortran module
mkdir -p $RPM_BUILD_ROOT%{_fmoddir}
mv $RPM_BUILD_ROOT%{_includedir}/matio.mod $RPM_BUILD_ROOT%{_fmoddir}
%check
pushd test
make check
popd
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING NEWS README
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%doc doxygen/html
%{_includedir}/matio*.h
%{_fmoddir}/matio.mod
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog
* Mon Apr 19 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 1.3.4-1
- Update to 1.3.4
- Remove uneeded patches.
* Wed Sep 30 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.3.3-5
- Fix location of Fortran module.
- Add Requires: pkgconfig on -devel.
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat May 23 2009 kwizart < kwizart at gmail.com > - 1.3.3-3
- Remove the test subpackage
- Enable make check
- Various typo and clean-up
* Wed Sep 24 2008 kwizart < kwizart at gmail.com > - 1.3.3-2
- Fix undefined-non-weak-symbol
- Fix missing f90 files in the debuginfo package
* Wed Sep 24 2008 kwizart < kwizart at gmail.com > - 1.3.3-1
- Initial package for fedora