]> git.pld-linux.org Git - SPECS.git/blob - java-log4j.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / java-log4j.spec
1 # TODO:
2 # - some tests fail, but it seems to be an error in tests, not in log4j
3 #
4 # NOTE:
5 # - jmx,jndi by java-sun-jre
6 #
7 # Conditional build:
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
13
14 %if %{without dist}
15 %define with_jms        1
16 %define with_jmx        1
17 %endif
18
19 %define         srcname log4j
20 Summary:        log4j - logging for Java
21 Summary(pl.UTF-8):      log4j - zapis logów dla Javy
22 Name:           java-%{srcname}
23 Version:        1.2.17
24 Release:        1
25 License:        Apache v2.0
26 Group:          Libraries/Java
27 Source0:        http://www.apache.org/dist/logging/log4j/%{version}/%{srcname}-%{version}.tar.gz
28 # Source0-md5:  8218714e41ee0c6509dcfeafa2e1f53f
29 Patch0:         apache-log4j-javadoc.patch
30 URL:            http://logging.apache.org/log4j/
31 BuildRequires:  ant >= 1.6.5
32 %{?with_tests:BuildRequires:    ant-junit}
33 BuildRequires:  java(javamail) >= 1.2
34 BuildRequires:  java(jaxp_parser_impl)
35 %{?with_jmx:BuildRequires:      java(jmx) >= 1.2.1}
36 BuildRequires:  jdk
37 %{?with_jms:BuildRequires:      jms >= 1.1}
38 %{?with_jmx:BuildRequires:      jmx-tools >= 1.2.1}
39 %{?with_jmx:BuildRequires:      java(jndi)}
40 BuildRequires:  jpackage-utils
41 %{?with_tests:BuildRequires:    junit >= 3.8}
42 BuildRequires:  rpmbuild(macros) >= 1.300
43 Suggests:       java(javamail) >= 1.2
44 %{?with_jms:Suggests:   jms >= 1.1}
45 %{?with_jmx:Suggests:   jmx-tools >= 1.2.1}
46 Obsoletes:      jakarta-log4j
47 Obsoletes:      log4j
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 With log4j it is possible to enable logging at runtime without
53 modifying the application binary.
54
55 %description -l pl.UTF-8
56 Przy użyciu log4j można włączyć zapis do logów przy uruchamianiu bez
57 modyfikowania binarnej aplikacji.
58
59 %package doc
60 Summary:        Online manual for log4j
61 Summary(pl.UTF-8):      Dokumentacja online do log4j
62 Group:          Documentation
63 Obsoletes:      jakarta-log4j-doc
64 Obsoletes:      logging-log4j-doc
65
66 %description doc
67 Online manual for log4j.
68
69 %description doc -l pl.UTF-8
70 Dokumentacja online do log4j.
71
72 %package javadoc
73 Summary:        API documentation for log4j
74 Summary(pl.UTF-8):      Dokumentacja API log4j
75 Group:          Documentation
76 Requires:       jpackage-utils
77 Obsoletes:      jakarta-log4j-doc
78 Obsoletes:      logging-log4j-javadoc
79
80 %description javadoc
81 API documentation for log4j.
82
83 %description javadoc -l pl.UTF-8
84 Dokumentacja API log4j.
85
86 %prep
87 %setup -q -n apache-log4j-%{version}
88 %patch0 -p1
89
90 %{__rm} log4j-%{version}.jar
91
92 %build
93 required_jars="mail activation %{?with_jms:jms} %{?with_jmx:jmx jmxtools}"
94 CLASSPATH=$(build-classpath $required_jars); export CLASSPATH
95 %ant jar javadoc
96
97 %if %{with tests}
98 cd tests
99 CLASSPATH=$(build-classpath $required_jars junit)
100 export CLASSPATH
101 %ant build runAll
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT{%{_javadir},%{_javadocdir}/%{srcname}-%{version}}
107 cp -a dist/lib/%{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
108 ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
109
110 cp -a docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
111 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post javadoc
117 ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
118
119 %files
120 %defattr(644,root,root,755)
121 %doc LICENSE NOTICE
122 %{_javadir}/log4j-%{version}.jar
123 %{_javadir}/log4j.jar
124
125 %files doc
126 %defattr(644,root,root,755)
127 %doc site/{css,images,xref,xref-test,*.html}
128
129 %files javadoc
130 %defattr(644,root,root,755)
131 %{_javadocdir}/%{srcname}-%{version}
132 %ghost %{_javadocdir}/%{srcname}
This page took 1.167783 seconds and 3 git commands to generate.