Репозиторий Sisyphus
Последнее обновление: 23 ноября 2017 | Пакетов: 17886 | Посещений: 10426780
en ru br
Репозитории ALT
S:1.2-alt1_11jpp8
www.altlinux.org/Changes

Группа :: Разработка/Java
Пакет: apache-commons-logging

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Epoch: 0
Group: Development/Java
# BEGIN SourceDeps(oneline):
BuildRequires: rpm-build-java
# END SourceDeps(oneline)
AutoReq: yes,noosgi
BuildRequires: rpm-build-java-osgi
BuildRequires: /proc
BuildRequires: jpackage-generic-compat
# fedora bcond_with macro
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
# redefine altlinux specific with and without
%define with()         %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()      %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
%bcond_without  avalon

%global short_name commons-logging

Name:           apache-%{short_name}
Version:        1.2
Release:        alt1_11jpp8
Summary:        Apache Commons Logging
License:        ASL 2.0
URL:            http://commons.apache.org/logging
Source0:        http://www.apache.org/dist/commons/logging/source/%{short_name}-%{version}-src.tar.gz
Source2:        http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom

Patch0:         0001-Generate-different-Bundle-SymbolicName-for-different.patch
Patch1:         0002-Port-to-maven-jar-plugin-3.0.0.patch

BuildRequires:  maven-local
%if %{with avalon}
BuildRequires:  mvn(avalon-framework:avalon-framework-api)
BuildRequires:  mvn(avalon-framework:avalon-framework-impl)
BuildRequires:  mvn(logkit:logkit)
%endif
BuildRequires:  mvn(javax.servlet:servlet-api)
BuildRequires:  mvn(junit:junit)
BuildRequires:  mvn(log4j:log4j:12)
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
BuildRequires:  mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)

BuildArch:      noarch
Source44: import.info


%description
The commons-logging package provides a simple, component oriented
interface (org.apache.commons.logging.Log) together with wrappers for
logging systems. The user can choose at runtime which system they want
to use. In addition, a small number of basic implementations are
provided to allow users to use the package standalone.
commons-logging was heavily influenced by Avalon's Logkit and Log4J. The
commons-logging abstraction is meant to minimize the differences between
the two, and to allow a developer to not tie himself to a particular
logging implementation.

%package        javadoc
Group: Development/Java
Summary:        API documentation for %{name}
BuildArch: noarch

%description    javadoc
%{summary}.

# -----------------------------------------------------------------------------


%prep
%setup -q -n %{short_name}-%{version}-src
%patch0 -p1
%patch1 -p1

%if %{with avalon}
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
%pom_remove_dep :avalon-framework
%pom_add_dep avalon-framework:avalon-framework-api:4.3:provided
%pom_add_dep avalon-framework:avalon-framework-impl:4.3:test
%pom_xpath_inject "pom:dependency[pom:artifactId='logkit']" '<scope>provided</scope>'

%else
%pom_remove_dep -r :avalon-framework
%pom_remove_dep -r :logkit
rm -r src/test/java/org/apache/commons/logging/{avalon,logkit}
rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java
rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
%endif

%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :maven-scm-publish-plugin

sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt

# for compatibility reasons

%mvn_file ":%{short_name}{*}" "%{short_name} at 1" "%{name} at 1"
%mvn_alias ":%{short_name}{*}" "org.apache.commons:%{short_name} at 1" "apache:%{short_name} at 1"

# Remove log4j12 tests

rm -rf src/test/java/org/apache/commons/logging/log4j/log4j12


%build
%mvn_build

# The build produces more artifacts from one pom

%mvn_artifact %{SOURCE2} target/%{short_name}-%{version}-api.jar
%mvn_artifact commons-logging:commons-logging-adapters:%{version} target/%{short_name}-%{version}-adapters.jar

# -----------------------------------------------------------------------------


%install
%mvn_install

%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
%doc PROPOSAL.html RELEASE-NOTES.txt

%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt

# -----------------------------------------------------------------------------


%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin