Accepting request 527494 from Java:packages

Fix build with jdk9

OBS-URL: https://build.opensuse.org/request/show/527494
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/werken-xpath?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2017-09-20 15:14:02 +00:00 committed by Git OBS Bridge
commit feccf05092
2 changed files with 12 additions and 12 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 20 09:39:48 UTC 2017 - fstrba@suse.com
- Fix build with jdk9: specify java source and target level 1.6
- Clean spec file and fix rpmlint errors and warnings
-------------------------------------------------------------------
Fri May 19 11:55:54 UTC 2017 - dziolkowski@suse.com

View File

@ -37,6 +37,7 @@ Patch7: %{name}-Driver.patch
Patch8: %{name}-runtests_sh.patch
BuildRequires: ant >= 1.6
BuildRequires: antlr
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: jdom
@ -44,8 +45,7 @@ BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires: jdom
Provides: werken.xpath = %{version}-%{release}
Obsoletes: werken.xpath <= 0.9.4
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: werken.xpath < 0.9.4
BuildArch: noarch
%description
@ -60,7 +60,7 @@ werken.canonical (XML canonicalization) packages.
Summary: Javadoc for %{name}
Group: Documentation/HTML
Provides: werken.xpath-javadoc = %{version}-%{release}
Obsoletes: werken.xpath-javadoc <= 0.9.4
Obsoletes: werken.xpath-javadoc < 0.9.4
%description javadoc
werken.xpath is an implementation of the W3C XPath Recommendation, on
@ -85,15 +85,10 @@ werken.canonical (XML canonicalization) packages.
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
#pushd lib
#ln -sf $(build-classpath antlr) antlr-runtime.jar
#ln -sf $(build-classpath jdom) jdom.jar
#ln -sf $(build-classpath xerces-j2) xerces.jar
#popd
%build
export CLASSPATH=$(build-classpath jdom antlr xerces-j2 xml-commons-apis)
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 -Dbuild.compiler=modern package javadoc compile-test
ant -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 -Dbuild.compiler=modern package javadoc compile-test
# Note that you'll have to java in PATH for this to work, it is by default
# when using a JPackage JVM.
CLASSPATH=$CLASSPATH:build/werken.xpath.jar:build/test/classes
@ -112,16 +107,15 @@ cp %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-werken-xpath.pom
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files
%defattr(0644,root,root,0755)
%doc INSTALL LICENSE LIMITATIONS README TODO
%doc LICENSE LIMITATIONS README TODO
%{_javadir}/*
%{_mavenpomdir}/*
%{_datadir}/maven-metadata/%{name}.xml*
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}
%changelog