Accepting request 871418 from Java:packages

use maven-local

OBS-URL: https://build.opensuse.org/request/show/871418
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-math?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2021-02-15 22:16:18 +00:00 committed by Git OBS Bridge
commit c2bdbe0716
3 changed files with 16 additions and 41 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 11 14:40:29 UTC 2021 - Matthias Mailänder <mailaender@opensuse.org>
- use maven local
- drop commons-math3-3.6.1-notests.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 11 11:22:34 UTC 2019 - Fridrich Strba <fstrba@suse.com> Mon Nov 11 11:22:34 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package apache-commons-math # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,12 +24,10 @@ Release: 0
Summary: The Apache Commons Mathematics Library Summary: The Apache Commons Mathematics Library
License: Apache-2.0 License: Apache-2.0
URL: http://commons.apache.org/%{base_name}/ URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}3-%{version}-src.tar.gz Source: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}3-%{version}-src.tar.gz
Patch0: commons-math3-3.6.1-notests.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local BuildRequires: maven-local
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildArch: noarch BuildArch: noarch
%description %description
@ -44,40 +42,22 @@ Summary: Javadoc for %{name}
This package contains the API documentation for %{name}. This package contains the API documentation for %{name}.
%prep %prep
%setup -q -n %{short_name}3-%{version}-src %autosetup -n %{short_name}3-%{version}-src
%patch0 -p1
%pom_remove_parent . %pom_remove_plugin :maven-antrun-plugin
%pom_remove_plugin :build-helper-maven-plugin
%build %build
export CLASSPATH=$(build-classpath ant-junit junit) %mvn_build -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
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
%install %install
# jars %mvn_install
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}
%files -f .mfiles %files -f .mfiles
%license LICENSE.txt license-header.txt NOTICE.txt %license LICENSE.txt license-header.txt NOTICE.txt
%doc RELEASE-NOTES.txt %doc RELEASE-NOTES.txt
%{_javadir}/%{name}.jar
%files javadoc %files javadoc -f .mfiles-javadoc
%license LICENSE.txt %license LICENSE.txt
%{_javadocdir}/%{name}
%changelog %changelog

View File

@ -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 @@
<!-- ========== Create Jar ================================================ -->
- <target name="jar" depends="test" description="Create jar file">
+ <target name="jar" depends="compile" description="Create jar file">
<copy file="LICENSE.txt" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
<copy file="NOTICE.txt" tofile="${build.home}/classes/META-INF/NOTICE.txt"/>