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