Accepting request 671842 from Java:packages

Clean-up the spec

OBS-URL: https://build.opensuse.org/request/show/671842
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-codec?expand=0&rev=18
This commit is contained in:
Stephan Kulow 2019-02-06 14:47:17 +00:00 committed by Git OBS Bridge
commit db8ec715f2
2 changed files with 14 additions and 28 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 5 12:21:12 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Clean-up the spec file
-------------------------------------------------------------------
Tue May 15 07:32:20 UTC 2018 - fstrba@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package apache-commons-codec
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2010, JPackage Project
#
# All modifications and additions to the file contributed by third parties
@ -13,7 +13,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# 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/
#
@ -25,13 +25,14 @@ Release: 0
Summary: Apache Commons Codec Package
License: Apache-2.0
Group: Development/Libraries/Java
Url: http://commons.apache.org/codec/
URL: http://commons.apache.org/codec/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source4: MANIFEST.MF
# PATCH-FIX-OPENSUSE Avoid spurious timeout in BeiderMorse tests
Patch0: timeout.patch
BuildRequires: ant >= 1.7
BuildRequires: ant-junit >= 1.7
BuildRequires: apache-commons-parent
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
@ -40,12 +41,12 @@ BuildRequires: javapackages-tools
# this should be a dependency of openjdk itself
BuildRequires: junit
BuildRequires: mozilla-nss
Requires: apache-commons-parent
Requires: java >= 1.8
Provides: jakarta-%{short_name} = %{version}
Obsoletes: jakarta-%{short_name} < %{version}
Provides: %{short_name} = %{version}
Obsoletes: %{short_name} < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
@ -72,16 +73,6 @@ Javadoc for %{name}.
sed -i 's/\r//' RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
%build
%if %with maven
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p ${MAVEN_REPO_LOCAL}
export MAVEN_OPTS="-Dmaven2.jpp.mode=true -Dmaven2.jpp.depmap.file=%{SOURCE2} -Dmaven.repo.local=${MAVEN_REPO_LOCAL} -Dproject.build.directory=$(pwd)/target"
%{_bindir}/mvn-jpp \
-e \
-s $(pwd)/settings.xml \
install javadoc:javadoc
%else
export CLASSPATH=$(build-classpath junit)
ant -Dbuild.sysclasspath=first \
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
@ -95,18 +86,13 @@ ant -Dbuild.sysclasspath=first \
-Dcomponent.version=%{version} \
-Dfinal.name=%{name}-%{version} \
-Dextension.name=%{short_name} \
test jar javadoc
%endif
jar javadoc
%install
# jars
mkdir -p %{buildroot}%{_javadir}
%if %with maven
cp -p target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%else
jar umf %{SOURCE4} dist/%{name}-%{version}.jar
cp -p dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%endif
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}-%{version}.jar
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
@ -126,16 +112,11 @@ ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/jakarta-%{short_name}-%{vers
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/jakarta-%{short_name}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%files
%files -f .mfiles
%defattr(0644,root,root,0755)
%doc LICENSE.txt RELEASE-NOTES.txt
%license LICENSE.txt
%doc RELEASE-NOTES.txt
%{_javadir}/*.jar
%{_mavenpomdir}/*
%if %{defined _maven_repository}
%config(noreplace) %{_mavendepmapfragdir}/%{name}
%else
%{_datadir}/maven-metadata/%{name}.xml
%endif
%files javadoc
%defattr(0644,root,root,0755)