]> git.pld-linux.org Git - packages/java-log4j.git/blame - java-log4j.spec
- don't force specific jdk
[packages/java-log4j.git] / java-log4j.spec
CommitLineData
55c630e0 1# TODO:
31de4089 2# - some tests fail, but it seems to be an error in tests, not in log4j
55c630e0 3#
953f3539 4# NOTE:
a05864ec 5# - jmx,jndi by java-sun-jre
3f42ed13
JB
6#
7# Conditional build:
77de6d58
SP
8%bcond_without dist # build components which can't be distributed
9%bcond_with java_sun # build with java-sun
10%bcond_with jms # JMS interface (org.apache.log4j.or.jms)
11%bcond_with jmx # JMX interface (org.apache.log4j.jmx)
12%bcond_with tests # tun tests
149946d4
JB
13#
14%if %{without dist}
15%define with_jms 1
16%define with_jmx 1
8240ab67 17%endif
1aa61a6b 18
265a63b6
SP
19%define srcname log4j
20#
6996f2e6 21%include /usr/lib/rpm/macros.java
a9eea00b 22Summary: log4j - logging for Java
f9f52620 23Summary(pl.UTF-8): log4j - zapis logów dla Javy
265a63b6 24Name: java-%{srcname}
8b195f22 25Version: 1.2.15
77de6d58 26Release: 8
81bec039 27License: Apache v2.0
1aa61a6b 28Group: Libraries/Java
265a63b6 29Source0: http://www.apache.org/dist/logging/log4j/%{version}/apache-%{srcname}-%{version}.tar.gz
8b195f22 30# Source0-md5: 10f04abe4d68d5a89e8eb167e4e45e1a
3bffd5e3 31URL: http://logging.apache.org/log4j/
8240ab67 32Patch0: apache-log4j-javadoc.patch
265a63b6 33Patch1: logging-%{srcname}-sourcetarget.patch
31de4089 34BuildRequires: ant >= 1.7.1-4
35%{?with_tests:BuildRequires: ant-junit}
cfb8e0b9 36BuildRequires: java(javamail) >= 1.2
37BuildRequires: java(jaxp_parser_impl)
38%{?with_jmx:BuildRequires: java(jmx) >= 1.2.1}
39BuildRequires: java-sun
3f42ed13 40%{?with_jms:BuildRequires: jms >= 1.1}
3f42ed13 41%{?with_jmx:BuildRequires: jmx-tools >= 1.2.1}
cfb8e0b9 42%{?with_jmx:BuildRequires: java(jndi)}
606bae28 43BuildRequires: jpackage-utils
31de4089 44%{?with_tests:BuildRequires: junit >= 3.8}
5f58d9a5 45BuildRequires: rpmbuild(macros) >= 1.300
cfb8e0b9 46Suggests: java(javamail) >= 1.2
3f42ed13
JB
47%{?with_jms:Suggests: jms >= 1.1}
48%{?with_jmx:Suggests: jmx-tools >= 1.2.1}
606bae28 49Provides: log4j = %{version}
1832db1e 50Obsoletes: jakarta-log4j
c9bdb1e4 51Obsoletes: log4j
fe28ab7c 52BuildArch: noarch
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
fe28ab7c 55%description
423e347d
JB
56With log4j it is possible to enable logging at runtime without
57modifying the application binary.
58
4c93720a
JR
59%description -l pl.UTF-8
60Przy użyciu log4j można włączyć zapis do logów przy uruchamianiu bez
423e347d 61modyfikowania binarnej aplikacji.
fe28ab7c 62
63%package doc
a9eea00b 64Summary: Online manual for log4j
f9f52620 65Summary(pl.UTF-8): Dokumentacja online do log4j
6996f2e6 66Group: Documentation
1832db1e 67Obsoletes: jakarta-log4j-doc
35813cab 68Obsoletes: logging-log4j-doc
fe28ab7c 69
70%description doc
423e347d
JB
71Online manual for log4j.
72
4c93720a 73%description doc -l pl.UTF-8
423e347d 74Dokumentacja online do log4j.
fe28ab7c 75
606bae28
JK
76%package javadoc
77Summary: API documentation for log4j
f9f52620 78Summary(pl.UTF-8): Dokumentacja API log4j
6996f2e6 79Group: Documentation
122ede73 80Requires: jpackage-utils
1832db1e 81Obsoletes: jakarta-log4j-doc
35813cab 82Obsoletes: logging-log4j-javadoc
606bae28
JK
83
84%description javadoc
85API documentation for log4j.
86
4c93720a 87%description javadoc -l pl.UTF-8
606bae28
JK
88Dokumentacja API log4j.
89
fe28ab7c 90%prep
8b195f22 91%setup -q -n apache-log4j-%{version}
8240ab67 92%patch0 -p1
31de4089 93%patch1 -p1
fe28ab7c 94
95%build
31de4089 96required_jars="mail activation %{?with_jms:jms} %{?with_jmx:jmx jmxtools}"
8240ab67 97CLASSPATH=$(build-classpath $required_jars); export CLASSPATH
b83cac24 98%ant jar javadoc
31de4089 99
100%if %{with tests}
101cd tests
62bf0a13 102CLASSPATH=$(build-classpath $required_jars junit)
31de4089 103export CLASSPATH
b83cac24 104%ant build runAll
31de4089 105%endif
fe28ab7c 106
107%install
108rm -rf $RPM_BUILD_ROOT
265a63b6
SP
109install -d $RPM_BUILD_ROOT{%{_javadir},%{_javadocdir}/%{srcname}-%{version}}
110cp -a dist/lib/%{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
111ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
6996f2e6 112
265a63b6
SP
113cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
114ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
fe28ab7c 115
fe28ab7c 116%clean
117rm -rf $RPM_BUILD_ROOT
118
a05864ec 119%post javadoc
265a63b6 120ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
a05864ec 121
fe28ab7c 122%files
123%defattr(644,root,root,755)
3f42ed13
JB
124%doc LICENSE NOTICE
125%{_javadir}/log4j-%{version}.jar
126%{_javadir}/log4j.jar
fe28ab7c 127
128%files doc
a9eea00b 129%defattr(644,root,root,755)
8240ab67 130%doc site/{css,images,xref,xref-test,*.html}
606bae28
JK
131
132%files javadoc
133%defattr(644,root,root,755)
265a63b6
SP
134%{_javadocdir}/%{srcname}-%{version}
135%ghost %{_javadocdir}/%{srcname}
This page took 0.053747 seconds and 4 git commands to generate.