Fridrich Strba 2019-11-11 11:25:30 +00:00 committed by Git OBS Bridge
parent 5266676cc2
commit 8988d6d2a3
2 changed files with 21 additions and 27 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Nov 11 11:22:34 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Add alias to the maven artifact
- Clean-up the spec file
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 15 12:56:51 UTC 2018 - fstrba@suse.com Tue May 15 12:56:51 UTC 2018 - 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) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# 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
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -23,19 +23,13 @@ Version: 3.6.1
Release: 0 Release: 0
Summary: The Apache Commons Mathematics Library Summary: The Apache Commons Mathematics Library
License: Apache-2.0 License: Apache-2.0
Group: Development/Libraries/Java 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 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 Patch0: commons-math3-3.6.1-notests.patch
BuildRequires: ant BuildRequires: ant
BuildRequires: ant-junit BuildRequires: ant-junit
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: junit
Requires: java >= 1.8
Provides: java(commons-math3:commons-math3) = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%description %description
@ -45,7 +39,6 @@ the Java programming language or Commons Lang.
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc %description javadoc
This package contains the API documentation for %{name}. This package contains the API documentation for %{name}.
@ -60,34 +53,29 @@ ant -Dant.build.javac.source=8 -Dcompile.source=8 \
-Dant.build.javac.target=8 -Dcompile.target=8 \ -Dant.build.javac.target=8 -Dcompile.target=8 \
-Dmaven.mode.offline=true -Dmaven.test.skip=true \ -Dmaven.mode.offline=true -Dmaven.test.skip=true \
-lib %{_datadir}/java -Dbuild.sysclasspath=first \ -lib %{_datadir}/java -Dbuild.sysclasspath=first \
jar javadoc jar javadoc
%install %install
# jars # jars
install -Dpm 644 target/%{short_name}*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar install -Dpm 644 target/%{short_name}*.jar %{buildroot}%{_javadir}/%{short_name}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) ln -sf %{_javadir}/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# pom # pom
install -d -m 755 %{buildroot}%{_mavenpomdir} install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar %add_maven_depmap %{short_name}.pom %{short_name}.jar -a %{short_name}:%{short_name}
# javadoc # javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version} install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr target/apidocs/ %{buildroot}%{_javadocdir}/%{name}-%{version}/ cp -pr target/apidocs/ %{buildroot}%{_javadocdir}/%{name}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%files %files -f .mfiles
%defattr(-,root,root) %license LICENSE.txt license-header.txt NOTICE.txt
%doc LICENSE.txt license-header.txt NOTICE.txt RELEASE-NOTES.txt %doc RELEASE-NOTES.txt
%{_javadir}/* %{_javadir}/%{name}.jar
%{_mavenpomdir}/*
%{_datadir}/maven-metadata/%{name}.xml
%files javadoc %files javadoc
%defattr(-,root,root) %license LICENSE.txt
%doc LICENSE.txt %{_javadocdir}/%{name}
%{_javadocdir}/*
%changelog %changelog