%global githash 9329195b310dd861e97b9655173b4aa564de05dc
Name:                jmatio
Version:             1.1
Release:             2
Summary:             Java Matlab IO library
License:             BSD
URL:                 https://github.com/gradusnikov/jmatio
Source0:             https://github.com/gradusnikov/jmatio/archive/%{githash}.zip
BuildRequires:       mvn(junit:junit) maven-local /usr/bin/perl
BuildArch:           noarch
%description
Matlab's MAT-file I/O API in Java.
Supports Matlab 5 MAT-file format
reading and writing.

%package javadoc
Summary:             Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.

%prep
%setup -q -n %{name}-%{githash}
for s in src/main/java/com/jmatio/types/MLSparse.java;do
  native2ascii -encoding UTF8 ${s} ${s}
done
%{__perl} -pi -e 's/\r$//g' LICENSE.txt README_old.txt

%build
%mvn_file :%{name} %{name}
%mvn_alias com.imaginglaboratory:%{name} net.sourceforge.%{name}:%{name}
%mvn_build

%install
%mvn_install

%files -f .mfiles
%doc README.md README_old.txt
%license LICENSE.txt

%files javadoc -f .mfiles-javadoc
%license LICENSE.txt

%changelog
* Wed Nov 09 2022 Ge Wang <wangge20@h-partners.com> - 1.1-2
- bring source file into correspondence with descirbed in spec file

* Tue Aug 18 2020 wangchong <wangchong56@huawei.com> - 1.1-1
- package init
