jakarta-commons-logging/jakarta-commons-logging.spec

205 lines
7.4 KiB
RPMSpec
Raw Normal View History

%define javahome %{_jvmdir}/jdk
Name: jakarta-commons-logging
Version: 1.1.1
Release: 7mamba
Summary: Jakarta Commons Logging Package
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://commons.apache.org/logging/
Source0: http://www.apache.org/dist/commons/logging/source/commons-logging-%{version}-src.tar.gz
Source1: http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-logging/commons-logging/%{version}/commons-logging-%{version}.pom
Source2: commons-logging-api-%{version}.pom
Source3: maven2-2.2.0-settings.xml
Patch0: jakarta-commons-logging-1.1.1-build_xml.patch
Patch1: jakarta-commons-logging-1.1.1-maven-release-plugin.patch
Patch2: jakarta-commons-logging-1.1.1-eclipse-manifest.patch
Patch3: jakarta-commons-logging-1.1.1-javadoc.patch
Patch4: jakarta-commons-logging-1.1.1-skiptest.patch
License: Apache License Version 2.0
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: apache-log4j
#%if "%{stage1}" != "1"
#BuildRequires: java-excalibur-avalon-logkit
#BuildRequires: java-excalibur-avalon-framework
#BuildRequires: java-excalibur-avalon-framework-api
#BuildRequires: java-excalibur-avalon-framework-impl
#%endif
#BuildRequires: java-servletapi4
#BuildRequires: java-junit3
BuildRequires: jpackage-utils
%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: Documentation
Summary: Javadoc for %{name}
%description javadoc
Commons Logging is a thin adapter allowing configurable bridging to other, well known logging systems
This package contains javadoc for %{name}.
%prep
%setup -q -n commons-logging-%{version}-src
%patch0 -p1
%patch1
%patch2
%patch3
%patch4 -p0
for j in $(find . -name "*.jar"); do
mv $j ${j}.no
done
%build
export JAVA_HOME=%{javahome}
export MAVEN_REPO_LOCAL=$PWD/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
cat > build.properties << EOF
junit.jar=$(build-classpath junit-3.8.2)
log4j.jar=$(build-classpath log4j)
log4j12.jar=$(build-classpath log4j)
servletapi.jar=$(build-classpath servletapi4)
%if "%{stage1}" != "1"
logkit.jar=$(build-classpath excalibur/avalon-logkit)
avalon-framework-api.jar=$(build-classpath excalibur/avalon-framework-api)
avalon-framework-impl.jar=$(build-classpath excalibur/avalon-framework-impl)
avalon-framework.jar=$(build-classpath excalibur/avalon-framework)
%endif
EOF
export CLASSPATH=$(build-classpath junit-3.8.2 ant/ant-junit)
ant all compile.tests
%if "%{stage1}" != "1"
CLASSPATH=$CLASSPATH:$(build-classpath excalibur/avalon-framework excalibur/avalon-framework-api)
CLASSPATH=$CLASSPATH:$(build-classpath excalibur/avalon-framework-impl excalibur/avalon-logkit)
%endif
CLASSPATH=$CLASSPATH:$(build-classpath log4j servletapi4):target/classes:target/tests
ant javadoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -p -m 644 target/commons-logging-%{version}-SNAPSHOT.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-%{version}.jar
install -p -m 644 target/commons-logging-adapters-%{version}-SNAPSHOT.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-adapters-%{version}.jar
install -p -m 644 target/commons-logging-api-%{version}-SNAPSHOT.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-api-%{version}.jar
install -p -m 644 target/commons-logging-appender.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-appender-%{version}.jar
install -p -m 644 target/commons-logging-tests.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-tests-%{version}.jar
install -p -m 644 target/commons-logging-wrapper.jar \
%{buildroot}%{_javadir}/jakarta-commons-logging-wrapper-%{version}.jar
%add_to_maven_depmap commons-logging commons-logging %{version} JPP commons-logging
%add_to_maven_depmap commons-logging commons-logging-api %{version} JPP commons-logging-api
# http://jira.codehaus.org/browse/MEV-591?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
#_to_maven_depmap commons-logging commons-logging-adapters %{version} JPP commons-logging-adapters
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-commons-logging.pom
install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-commons-logging-api.pom
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
done
)
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
%if "%{stage1}" != "1"
mkdir -p %{buildroot}%{_javadocdir}/jakarta-commons-logging-%{version}
cp -pr target/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -sf %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%endif
#%{_bindir}/aot-compile-rpm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root)
%{_javadir}/commons-logging-%{version}.jar
%{_javadir}/commons-logging-adapters-%{version}.jar
%{_javadir}/commons-logging-api-%{version}.jar
%{_javadir}/jakarta-commons-logging-%{version}.jar
%{_javadir}/jakarta-commons-logging-adapters-%{version}.jar
%{_javadir}/jakarta-commons-logging-api-%{version}.jar
%{_javadir}/commons-logging-adapters.jar
%{_javadir}/commons-logging-api.jar
%{_javadir}/commons-logging.jar
%{_javadir}/jakarta-commons-logging-adapters.jar
%{_javadir}/jakarta-commons-logging-api.jar
%{_javadir}/jakarta-commons-logging.jar
%{_javadir}/commons-logging-appender-%{version}.jar
%{_javadir}/commons-logging-appender.jar
%{_javadir}/commons-logging-tests-%{version}.jar
%{_javadir}/commons-logging-tests.jar
%{_javadir}/commons-logging-wrapper-%{version}.jar
%{_javadir}/commons-logging-wrapper.jar
%{_javadir}/jakarta-commons-logging-appender-%{version}.jar
%{_javadir}/jakarta-commons-logging-appender.jar
%{_javadir}/jakarta-commons-logging-tests-%{version}.jar
%{_javadir}/jakarta-commons-logging-tests.jar
%{_javadir}/jakarta-commons-logging-wrapper-%{version}.jar
%{_javadir}/jakarta-commons-logging-wrapper.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc PROPOSAL.html STATUS.html LICENSE.txt RELEASE-NOTES.txt
%if "%{stage1}" != "1"
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%endif
%changelog
* Wed Mar 23 2011 gil <puntogil@libero.it> 1.1.1-7mamba
- rebuilt with java-openjdk support
* Sat Oct 30 2010 gil <puntogil@libero.it> 1.1.1-6mamba
- rebuilt devel
* Mon Jan 11 2010 gil <puntogil@libero.it> 1.1.1-5mamba
- fix OSGi MANIFEST
* Fri Jul 03 2009 gil <puntogil@libero.it> 1.1.1-4mamba
- added maven poms
* Sat Apr 04 2009 gil <puntogil@libero.it> 1.1.1-3mamba
- added package javadoc
* Mon Mar 09 2009 gil <puntogil@libero.it> 1.1.1-2mamba
- rebuilt
* Sat Feb 28 2009 gil <puntogil@libero.it> 1.1.1-1mamba
- package created by autospec