diff --git a/apache-commons-math.changes b/apache-commons-math.changes index 337170b..a8642c5 100644 --- a/apache-commons-math.changes +++ b/apache-commons-math.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 11 14:40:29 UTC 2021 - Matthias Mailänder + +- use maven local +- drop commons-math3-3.6.1-notests.patch + ------------------------------------------------------------------- Mon Nov 11 11:22:34 UTC 2019 - Fridrich Strba diff --git a/apache-commons-math.spec b/apache-commons-math.spec index c5dcdca..0328f35 100644 --- a/apache-commons-math.spec +++ b/apache-commons-math.spec @@ -1,7 +1,7 @@ # # spec file for package apache-commons-math # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,12 +24,13 @@ Release: 0 Summary: The Apache Commons Mathematics Library License: Apache-2.0 URL: http://commons.apache.org/%{base_name}/ -Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}3-%{version}-src.tar.gz -Patch0: commons-math3-3.6.1-notests.patch +Source: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}3-%{version}-src.tar.gz BuildRequires: ant BuildRequires: ant-junit BuildRequires: java-devel >= 1.8 -BuildRequires: javapackages-local +BuildRequires: maven-antrun-plugin +BuildRequires: maven-local +BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildArch: noarch %description @@ -44,40 +45,27 @@ Summary: Javadoc for %{name} This package contains the API documentation for %{name}. %prep -%setup -q -n %{short_name}3-%{version}-src -%patch0 -p1 +%autosetup -n %{short_name}3-%{version}-src -%pom_remove_parent . +# Compatibility links +%mvn_alias "org.apache.commons:%{short_name}" "%{short_name}:%{short_name}" +%mvn_file :%{short_name} %{short_name} %{name} + +# Skip test that fails on Java 11 +sed -i -e '/checkMissingFastMathClasses/i@Ignore' \ +src/test/java/org/apache/commons/math3/util/FastMathTest.java %build -export CLASSPATH=$(build-classpath ant-junit junit) -ant -Dant.build.javac.source=8 -Dcompile.source=8 \ - -Dant.build.javac.target=8 -Dcompile.target=8 \ - -Dmaven.mode.offline=true -Dmaven.test.skip=true \ - -lib %{_datadir}/java -Dbuild.sysclasspath=first \ - jar javadoc +%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %install -# jars -install -Dpm 644 target/%{short_name}*.jar %{buildroot}%{_javadir}/%{short_name}.jar -ln -sf %{_javadir}/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar - -# pom -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom -%add_maven_depmap %{short_name}.pom %{short_name}.jar -a %{short_name}:%{short_name} - -# javadoc -install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version} -cp -pr target/apidocs/ %{buildroot}%{_javadocdir}/%{name} +%mvn_install %files -f .mfiles %license LICENSE.txt license-header.txt NOTICE.txt %doc RELEASE-NOTES.txt -%{_javadir}/%{name}.jar -%files javadoc +%files javadoc -f .mfiles-javadoc %license LICENSE.txt -%{_javadocdir}/%{name} %changelog diff --git a/commons-math3-3.6.1-notests.patch b/commons-math3-3.6.1-notests.patch deleted file mode 100644 index 11caa6c..0000000 --- a/commons-math3-3.6.1-notests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- commons-math3-3.6.1-src/build.xml 2016-03-17 13:14:52.000000000 +0100 -+++ commons-math3-3.6.1-src/build.xml 2017-09-14 15:29:12.339511947 +0200 -@@ -256,7 +256,7 @@ - - - -- -+ - - -