From 6359f3e734e74110d443500bf80e773d60ec757b36449d7a73a9604cae22fc34 Mon Sep 17 00:00:00 2001
From: Fridrich Strba <fstrba@suse.com>
Date: Tue, 15 May 2018 13:37:53 +0000
Subject: [PATCH] OBS-URL:
 https://build.opensuse.org/package/show/Java:packages/apache-portlet-1_0-api?expand=0&rev=17

---
 apache-portlet-1.0-api-build.xml | 4 ++--
 apache-portlet-1_0-api.changes   | 7 +++++++
 apache-portlet-1_0-api.spec      | 6 ++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/apache-portlet-1.0-api-build.xml b/apache-portlet-1.0-api-build.xml
index 182d0cb..8c85b0d 100644
--- a/apache-portlet-1.0-api-build.xml
+++ b/apache-portlet-1.0-api-build.xml
@@ -39,7 +39,7 @@
   <target name="compile" description="o Compile the code" depends="get-deps">
     <mkdir dir="${classesdir}">
     </mkdir>
-    <javac source="1.6" target="1.6" destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+    <javac source="8" target="8" destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
       <src>
         <pathelement location="src/java">
         </pathelement>
@@ -98,7 +98,7 @@
     </property>
     <property name="title" value="Java Portlet API 1.0 API">
     </property>
-    <javadoc use="true" private="true" destdir="${javadocdir}" source="1.6" author="true" version="true" sourcepath="src/java" packagenames="javax.portlet.*">
+    <javadoc use="true" private="true" destdir="${javadocdir}" source="8" author="true" version="true" sourcepath="src/java" packagenames="javax.portlet.*">
       <classpath>
         <path refid="build.classpath">
         </path>
diff --git a/apache-portlet-1_0-api.changes b/apache-portlet-1_0-api.changes
index be68f4f..98d1730 100644
--- a/apache-portlet-1_0-api.changes
+++ b/apache-portlet-1_0-api.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Tue May 15 13:36:57 UTC 2018 - fstrba@suse.com
+
+- Build with source and target 8 to prepare for a possible removal
+  of 1.6 compatibility in OpenJDK 11
+- Run fdupes on documentation
+
 -------------------------------------------------------------------
 Fri Sep 15 07:33:39 UTC 2017 - fstrba@suse.com
 
diff --git a/apache-portlet-1_0-api.spec b/apache-portlet-1_0-api.spec
index b30add9..53b0888 100644
--- a/apache-portlet-1_0-api.spec
+++ b/apache-portlet-1_0-api.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package apache-portlet-1_0-api
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,8 @@ Source1:        apache-portlet-1.0-api-pom.xml
 Source2:        apache-portlet-1.0-api-LICENSE.TXT
 Source3:        apache-portlet-1.0-api-build.xml
 BuildRequires:  ant >= 1.6
-BuildRequires:  java-devel >= 1.4
+BuildRequires:  fdupes
+BuildRequires:  java-devel >= 1.8
 BuildRequires:  javapackages-local
 BuildRequires:  javapackages-tools
 Provides:       portlet = %{version}
@@ -79,6 +80,7 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
 cp -pr target/site/apidocs/* \
         %{buildroot}%{_javadocdir}/%{name}-%{version}
 ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
+%fdupes -s %{buildroot}%{_javadocdir}/%{name}
 install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
 cp %{SOURCE2} %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE.TXT