Cleanup spec file

This commit is contained in:
Mikolaj Izdebski 2018-01-29 09:24:35 +01:00
parent c25d2cd7e6
commit 8f5bc0c656

View File

@ -1,15 +1,15 @@
%bcond_without avalon %bcond_without avalon
%global short_name commons-logging Name: apache-commons-logging
Name: apache-%{short_name}
Version: 1.2 Version: 1.2
Release: 11%{?dist} Release: 12%{?dist}
Summary: Apache Commons Logging Summary: Apache Commons Logging
License: ASL 2.0 License: ASL 2.0
URL: http://commons.apache.org/logging URL: http://commons.apache.org/logging
Source0: http://www.apache.org/dist/commons/logging/source/%{short_name}-%{version}-src.tar.gz BuildArch: noarch
Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
Source0: http://www.apache.org/dist/commons/logging/source/commons-logging-%{version}-src.tar.gz
Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.pom
Patch0: 0001-Generate-different-Bundle-SymbolicName-for-different.patch Patch0: 0001-Generate-different-Bundle-SymbolicName-for-different.patch
Patch1: 0002-Port-to-maven-jar-plugin-3.0.0.patch Patch1: 0002-Port-to-maven-jar-plugin-3.0.0.patch
@ -28,9 +28,6 @@ BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildArch: noarch
%description %description
The commons-logging package provides a simple, component oriented The commons-logging package provides a simple, component oriented
interface (org.apache.commons.logging.Log) together with wrappers for interface (org.apache.commons.logging.Log) together with wrappers for
@ -42,18 +39,10 @@ commons-logging abstraction is meant to minimize the differences between
the two, and to allow a developer to not tie himself to a particular the two, and to allow a developer to not tie himself to a particular
logging implementation. logging implementation.
%package javadoc %{?javadoc_package}
Summary: API documentation for %{name}
%description javadoc
%{summary}.
# -----------------------------------------------------------------------------
%prep %prep
%setup -q -n %{short_name}-%{version}-src %autosetup -p1 -n commons-logging-%{version}-src
%patch0 -p1
%patch1 -p1
%if %{with avalon} %if %{with avalon}
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143 # Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
@ -76,21 +65,18 @@ rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
# for compatibility reasons # for compatibility reasons
%mvn_file ":%{short_name}{*}" "%{short_name}@1" "%{name}@1" %mvn_file ":commons-logging{*}" "commons-logging@1" "%{name}@1"
%mvn_alias ":%{short_name}{*}" "org.apache.commons:%{short_name}@1" "apache:%{short_name}@1" %mvn_alias ":commons-logging{*}" "org.apache.commons:commons-logging@1" "apache:commons-logging@1"
# Remove log4j12 tests # Remove log4j12 tests
rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12 rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
%build %build
%mvn_build %mvn_build
# The build produces more artifacts from one pom # The build produces more artifacts from one pom
%mvn_artifact %{SOURCE2} target/%{short_name}-%{version}-api.jar %mvn_artifact %{SOURCE2} target/commons-logging-%{version}-api.jar
%mvn_artifact commons-logging:commons-logging-adapters:%{version} target/%{short_name}-%{version}-adapters.jar %mvn_artifact commons-logging:commons-logging-adapters:%{version} target/commons-logging-%{version}-adapters.jar
# -----------------------------------------------------------------------------
%install %install
%mvn_install %mvn_install
@ -99,12 +85,10 @@ rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12
%license LICENSE.txt NOTICE.txt %license LICENSE.txt NOTICE.txt
%doc PROPOSAL.html RELEASE-NOTES.txt %doc PROPOSAL.html RELEASE-NOTES.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt
# -----------------------------------------------------------------------------
%changelog %changelog
* Mon Jan 29 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2-12
- Cleanup spec file
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-11 * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild