Name:                apache-mime4j
Version:             0.8.3
Release:             2
Summary:             Apache JAMES Mime4j
License:             Apache-2.0
URL:                 http://james.apache.org/mime4j
Source0:             http://archive.apache.org/dist/james/mime4j/0.8.3/james-mime4j-sources-0.8.3.zip
# https://github.com/apache/james-mime4j/commit/9dec5df2a588fed8027839815daefa79ee66efd1
Patch0:              CVE-2024-21742.patch
BuildRequires:       maven-local mvn(com.google.guava:guava:18.0) mvn(commons-io:commons-io)
BuildRequires:       mvn(commons-logging:commons-logging) mvn(junit:junit)
BuildRequires:       mvn(org.apache:apache:pom:) mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:       mvn(org.assertj:assertj-core) mvn(org.codehaus.mojo:javacc-maven-plugin)
BuildRequires:       mvn(org.mockito:mockito-core) mvn(org.slf4j:slf4j-api)
BuildArch:           noarch
%description
Java stream based MIME message parser.

%package javadoc
Summary:             Javadoc for %{name}
%description javadoc
API documentation for %{name}.

%prep
%autosetup -n james-mime4j -p1
%pom_remove_plugin :apache-rat-plugin
%pom_remove_plugin :maven-jar-plugin
%pom_disable_module assemble
for p in core dom storage; do
  %mvn_file :*$p %{name}/%{name}-$p %{name}/$p
done

%build
%mvn_build -f -- -Dsource=8

%install
%mvn_install

%files -f .mfiles
%doc RELEASE_NOTES.txt
%license LICENSE NOTICE

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

%changelog
* Thu Feb 29 2024 yaoxin <yao_xin001@hoperun.com> - 0.8.3-2
- Fix CVE-2024-21742

* Tue Jun 14 2022 SimpleUpdate Robot <tc@openeuler.org> - 0.8.3-1
- Upgrade to version 0.8.3

* Tue Dec 22 2020 Ge Wang <wangge20@huawei.com> - 0.8.1-2
- Modify license infomation

* Thu Aug 13 2020 chengzihan <chengzihan2@huawei.com> - 0.8.1-1
- Package init
