- use add_maven_depmap from javapackages-tools - Move from jpackage-utils to javapackage-tools OBS-URL: https://build.opensuse.org/request/show/198424 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/slf4j?expand=0&rev=4
207 lines
7.2 KiB
RPMSpec
207 lines
7.2 KiB
RPMSpec
#
|
|
# spec file for package slf4j
|
|
#
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2000-2009, JPackage Project
|
|
# All rights reserved.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: slf4j
|
|
Version: 1.6.1
|
|
Release: 0
|
|
Summary: Simple Logging Facade for Java
|
|
License: MIT
|
|
Group: Development/Libraries/Java
|
|
Url: http://www.slf4j.org/
|
|
Source0: http://www.slf4j.org/dist/%{name}-%{version}.tar.gz
|
|
Source1: build.xml.tar.bz2
|
|
Patch0: %{name}-pom_xml.patch
|
|
Patch1: build-remove-slf4j_api-binder.patch
|
|
|
|
Requires(post): javapackages-tools
|
|
Requires(postun): javapackages-tools
|
|
BuildRequires: ant >= 1.6.5
|
|
BuildRequires: ant-junit >= 1.6.5
|
|
BuildRequires: apache-commons-logging
|
|
BuildRequires: cal10n
|
|
BuildRequires: jakarta-commons-lang
|
|
BuildRequires: java-devel >= 1.5.0
|
|
BuildRequires: javapackages-tools
|
|
BuildRequires: javassist >= 3.4
|
|
BuildRequires: junit >= 3.8.2
|
|
BuildRequires: log4j
|
|
Requires: cal10n
|
|
Requires: java
|
|
Requires: javapackages-tools
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
The Simple Logging Facade for Java or (SLF4J) is intended to serve
|
|
as a simple facade for various logging APIs allowing to the end-user
|
|
to plug in the desired implementation at deployment time. SLF4J also
|
|
allows for a gradual migration path away from
|
|
Jakarta Commons Logging (JCL).
|
|
|
|
Logging API implementations can either choose to implement the
|
|
SLF4J interfaces directly, e.g. NLOG4J or SimpleLogger. Alternatively,
|
|
it is possible (and rather easy) to write SLF4J adapters for the given
|
|
API implementation, e.g. Log4jLoggerAdapter or JDK14LoggerAdapter..
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
Group: Documentation/HTML
|
|
Requires: javapackages-tools
|
|
|
|
%description javadoc
|
|
API documentation for %{name}.
|
|
|
|
%package manual
|
|
Summary: Documents for %{name}
|
|
Group: Documentation/Other
|
|
|
|
%description manual
|
|
Manual for %{name}.
|
|
|
|
%prep
|
|
%setup -q
|
|
tar xf %{SOURCE1}
|
|
%patch0 -p0 -b .sav
|
|
%patch1 -p1
|
|
find . -name "*.jar" | xargs rm
|
|
|
|
sed -i -e "s|ant<|org.apache.ant<|g" integration/pom.xml
|
|
|
|
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
|
|
%{_bindir}/xargs -t %{__perl} -pi -e 's/\r$//g'
|
|
|
|
%build
|
|
export CLASSPATH=$(build-classpath log4j \
|
|
commons-logging \
|
|
jakarta-commons-lang \
|
|
javassist-3.14.0 \
|
|
cal10n)
|
|
export CLASSPATH=$CLASSPATH:$(pwd)/slf4j-api/target/slf4j-api-%{version}.jar
|
|
ant -Dmaven2.jpp.mode=true \
|
|
-Dmaven.test.skip=true \
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
package javadoc \
|
|
|
|
%install
|
|
# jars
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
|
|
|
|
install -m 644 jcl-over-slf4j/target/jcl-over-slf4j-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/jcl-over-slf4j.jar
|
|
install -m 644 jul-to-slf4j/target/jul-to-slf4j-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/jul-to-slf4j.jar
|
|
install -m 644 log4j-over-slf4j/target/log4j-over-slf4j-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/log4j-over-slf4j.jar
|
|
install -m 644 slf4j-api/target/%{name}-api-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/api.jar
|
|
install -m 644 slf4j-ext/target/%{name}-ext-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/ext.jar
|
|
install -m 644 slf4j-jcl/target/%{name}-jcl-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/jcl.jar
|
|
install -m 644 slf4j-jdk14/target/%{name}-jdk14-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/jdk14.jar
|
|
install -m 644 slf4j-log4j12/target/%{name}-log4j12-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/log4j12.jar
|
|
install -m 644 slf4j-migrator/target/%{name}-migrator-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/migrator.jar
|
|
install -m 644 slf4j-nop/target/%{name}-nop-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/nop.jar
|
|
install -m 644 slf4j-simple/target/%{name}-simple-%{version}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}/simple.jar
|
|
|
|
# poms
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
|
install -pm 644 pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-parent.pom
|
|
# % add_maven_depmap JPP.%{name}-parent.pom %{name}/pa
|
|
|
|
install -pm 644 jcl-over-slf4j/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-jcl-over-slf4j.pom
|
|
%add_maven_depmap JPP.%{name}-jcl-over-slf4j.pom %{name}/jcl-over-slf4j.jar
|
|
|
|
install -pm 644 jul-to-slf4j/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-jul-to-slf4j.pom
|
|
%add_maven_depmap JPP.%{name}-jul-to-slf4j.pom %{name}/jul-to-slf4j.jar
|
|
|
|
install -pm 644 log4j-over-slf4j/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-log4j-over-slf4j.pom
|
|
%add_maven_depmap JPP.%{name}-log4j-over-slf4j.pom %{name}/log4j-over-slf4j.jar
|
|
|
|
install -pm 644 slf4j-api/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-api.pom
|
|
%add_maven_depmap JPP.%{name}-api.pom %{name}/api.jar
|
|
|
|
install -pm 644 slf4j-ext/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-ext.pom
|
|
%add_maven_depmap JPP.%{name}-ext.pom %{name}/ext.jar
|
|
|
|
install -pm 644 slf4j-jcl/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-jcl.pom
|
|
%add_maven_depmap JPP.%{name}-jcl.pom %{name}/jcl.jar
|
|
|
|
install -pm 644 slf4j-jdk14/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-jdk14.pom
|
|
%add_maven_depmap JPP.%{name}-jdk14.pom %{name}/jdk14.jar
|
|
|
|
install -pm 644 slf4j-log4j12/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-log4j12.pom
|
|
%add_maven_depmap JPP.%{name}-log4j12.pom %{name}/log4j12.jar
|
|
|
|
install -pm 644 slf4j-migrator/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-migrator.pom
|
|
%add_maven_depmap JPP.%{name}-migrator.pom %{name}/migrator.jar
|
|
|
|
install -pm 644 slf4j-nop/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-nop.pom
|
|
%add_maven_depmap JPP.%{name}-nop.pom %{name}/nop.jar
|
|
|
|
install -pm 644 slf4j-simple/pom.xml \
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-simple.pom
|
|
# % add_maven_depmap JPP.%{name}-simple.pom JPP.%{name}-simple.pom
|
|
|
|
# manual
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
rm -f target/site/.htaccess
|
|
cp -pr target/site $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
|
|
install -m 644 LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
|
|
|
|
# javadoc
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
cp -pr target/site/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
|
|
rm -rf target/site
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%dir %{_docdir}/%{name}-%{version}
|
|
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
|
|
%{_javadir}/%{name}
|
|
%{_mavenpomdir}/*
|
|
%{_mavendepmapfragdir}/*
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root,-)
|
|
%{_javadocdir}/%{name}
|
|
|
|
%files manual
|
|
%defattr(-,root,root,-)
|
|
%{_docdir}/%{name}-%{version}/site
|
|
|
|
%changelog
|