From d0b4adcf1dc74402ebf1069294cface7f9b9f5ba47774ad28de45f7a6d895385 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 18 Sep 2017 06:43:48 +0000 Subject: [PATCH 1/2] Fix build with jdk9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/cpptasks?expand=0&rev=3 --- cpptasks.spec | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cpptasks.spec b/cpptasks.spec index ff55b12..160307b 100644 --- a/cpptasks.spec +++ b/cpptasks.spec @@ -1,7 +1,7 @@ # # spec file for package cpptasks # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -24,17 +24,14 @@ License: Apache-2.0 Group: Development/Libraries/Java Url: http://ant-contrib.sourceforge.net/ Source0: http://downloads.sourceforge.net/ant-contrib/%{name}-%{version}.tar.gz - BuildRequires: ant BuildRequires: ant-junit +BuildRequires: fdupes BuildRequires: jpackage-utils BuildRequires: junit - Requires: ant Requires: java - BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This ant task can compile various source languages and produce @@ -50,13 +47,15 @@ Group: Documentation/Other Javadoc documentation for %{summary}. %prep -%setup -q -n %{name}-%{version} +%setup -q find . -name '*.jar' -type f -delete -print %build export OPT_JAR_LIST="ant/ant-junit junit" export CLASSPATH="" -%ant jars javadocs +%{ant} \ + -Djavac.source=1.6 -Djavac.target=1.6 \ + jars javadocs %install # jars @@ -65,14 +64,13 @@ ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar # javadoc install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version} cp -pr target/javadocs/* %{buildroot}%{_javadocdir}/%{name}-%{version} +%fdupes -s %{buildroot}%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink %files -%defattr(-,root,root,-) %{_javadir}/*.jar %files javadoc -%defattr(-,root,root,-) %doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} From 5efa70a57a84602ede61757c9365c70ea5352e66af5a991420e4963557fc7805 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 18 Sep 2017 06:45:07 +0000 Subject: [PATCH 2/2] Fix build with jdk9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/cpptasks?expand=0&rev=4 --- cpptasks.changes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpptasks.changes b/cpptasks.changes index c375c74..111d896 100644 --- a/cpptasks.changes +++ b/cpptasks.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Sep 18 06:44:19 UTC 2017 - fstrba@suse.com + +- Specify java source and target version 1.6 in order to allow + building with jdk9 +- Fix rpmlint errors +- Clean spec file + ------------------------------------------------------------------- Fri Sep 14 17:53:00 UTC 2012 - dmitry_r@opensuse.org