Name:                apache-mime4j
Version:             0.8.7
Release:             1
Summary:             Apache JAMES Mime4j
License:             ASL 2.0 and Artistic
URL:                 http://james.apache.org/mime4j
Source0:             http://archive.apache.org/dist/james/mime4j/${version}/james-mime4j-sources-%{version}.zip
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)
BuildRequires:       mvn(com.google.guava:guava)
BuildArch:           noarch
%description
Java stream based MIME message parser.

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

%prep
%setup -q -n %{name}-project-%{version}
%pom_remove_plugin :apache-rat-plugin
%pom_remove_plugin :maven-jar-plugin
%pom_disable_module assemble
sed -i 's/Date: Thu, 4 Oct 2001 20:12:26 -0700 (PDT),Thu, 4 Oct 2001 20:12:26 -0700/Date: Fri, 5 Oct 2001 03:12:26 -0700 (PDT),Fri, 5 Oct 2001 03:12:26 -0700/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
sed -i 's/Date: Wed, 16 Jul 2008 17:12:33 +0200 (PDT)/Date: Wed, 16 Jul 2008 15:12:33 +0200 (PDT)/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
sed -i 's/Date: Wed, 16 Jul 08 17:12:33 +0200/Date: Wed, 16 Jul 08 15:12:33 +0200/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
sed -i 's/Date: Wed, 16 Jul 2008 17:12:33 +0200/Date: Wed, 16 Jul 2008 15:12:33 +0200/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
sed -i 's/Date: 16 Jul 2008 17:12:33 +0200/Date: 16 Jul 2008 15:12:33 +0200/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
sed -i 's/1175052759000L/1175088759000L/g' dom/src/test/java/org/apache/james/mime4j/field/LenientDateTimeFieldTest.java
for p in core dom storage; do
  %mvn_file :*$p %{name}/%{name}-$p %{name}/$p
done

%build
%mvn_build

%install
%mvn_install

%files -f .mfiles
%doc CHANGELOG.md
%license LICENSE NOTICE

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

%changelog
* Wed Dec 13 2023 Ge Wang <wang__ge@126.com> - 0.8.7-1
- Upgrade to version 0.8.7

* 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
