/log4j.spec
Unknown | 337 lines | 263 code | 74 blank | 0 comment | 0 complexity | 40241d3dfd56d9bb4ef7428daaf5546e MD5 | raw file
Possible License(s): Apache-2.0
1
2%global bootstrap %{?_with_bootstrap:1}%{!?_with_bootstrap:%{?_without_bootstrap:0}%{!?_without_bootstrap:%{?_bootstrap:%{_bootstrap}}%{!?_bootstrap:0}}}
3
4Name: log4j
5Version: 1.2.17
6Release: 3%{?dist}
7Epoch: 0
8Summary: Java logging package
9BuildArch: noarch
10License: ASL 2.0
11Group: Development/Libraries
12URL: http://logging.apache.org/%{name}
13Source0: http://www.apache.org/dist/logging/%{name}/%{version}/%{name}-%{version}.tar.gz
14# Converted from src/java/org/apache/log4j/lf5/viewer/images/lf5_small_icon.gif
15Source1: %{name}-logfactor5.png
16Source2: %{name}-logfactor5.sh
17Source3: %{name}-logfactor5.desktop
18# Converted from docs/images/logo.jpg
19Source4: %{name}-chainsaw.png
20Source5: %{name}-chainsaw.sh
21Source6: %{name}-chainsaw.desktop
22Source7: %{name}.catalog
23Patch0: 0001-logfactor5-changed-userdir.patch
24Patch1: 0006-Remove-mvn-clirr-plugin.patch
25Patch2: 0009-Remove-ant-run-of-tests.patch
26Patch3: 0010-Fix-javadoc-link.patch
27Patch4: 0011-Remove-openejb.patch
28Patch5: 0012-Add-proper-bundle-symbolicname.patch
29
30BuildRequires: %{__perl}
31BuildRequires: java >= 1:1.6.0
32BuildRequires: jpackage-utils >= 0:1.6
33BuildRequires: javamail
34BuildRequires: geronimo-jms
35BuildRequires: geronimo-parent-poms
36BuildRequires: desktop-file-utils
37BuildRequires: jpackage-utils >= 0:1.7.2
38BuildRequires: maven-plugin-bundle
39BuildRequires: maven-surefire-plugin
40BuildRequires: maven-surefire-provider-junit
41BuildRequires: maven-ant-plugin
42BuildRequires: maven-antrun-plugin
43BuildRequires: maven-assembly-plugin
44BuildRequires: maven-changes-plugin
45BuildRequires: maven-compiler-plugin
46BuildRequires: maven-idea-plugin
47BuildRequires: maven-install-plugin
48BuildRequires: maven-jar-plugin
49BuildRequires: maven-javadoc-plugin
50BuildRequires: maven-resources-plugin
51BuildRequires: maven-site-plugin
52BuildRequires: maven-skins
53BuildRequires: ant-junit
54BuildRequires: ant-contrib
55
56Requires: java >= 1:1.6.0
57Requires: jpackage-utils >= 0:1.6
58
59%description
60Log4j is a tool to help the programmer output log statements to a
61variety of output targets.
62
63%package manual
64Summary: Developer manual for %{name}
65Group: Documentation
66Requires: %{name}-javadoc = %{version}-%{release}
67
68%description manual
69%{summary}.
70
71%package javadoc
72Summary: API documentation for %{name}
73Group: Documentation
74Requires: jpackage-utils
75
76%description javadoc
77%{summary}.
78
79%prep
80%setup -q -n apache-%{name}-%{version}
81# see patch files themselves for reasons for applying
82%patch0 -p1 -b .logfactor-home
83%patch1 -p1 -b .remove-mvn-clirr
84%patch2 -p1 -b .remove-tests
85%patch3 -p1 -b .xlink-javadoc
86%patch4 -p1 -b .openejb
87%patch5 -p1 -b .bundlename
88
89sed -i "s|groupId>ant<|groupId>org.apache.ant<|g" pom.xml
90
91sed -i 's/\r//g' LICENSE NOTICE site/css/*.css site/xref/*.css \
92 site/xref-test/*.css
93
94# fix encoding of mailbox files
95for i in contribs/JimMoore/mail*;do
96 iconv --from=ISO-8859-1 --to=UTF-8 "$i" > new
97 mv new "$i"
98done
99
100# remove all the stuff we'll build ourselves
101find . \( -name "*.jar" -o -name "*.class" \) -exec %__rm -f {} \;
102%__rm -rf docs/api
103
104
105
106%build
107# we don't need javadoc:javadoc because build system is broken and
108# builds javadoc when install-ing
109# also note that maven.test.skip doesn't really work and we had to
110# patch ant run of tests out of pom
111mvn-rpmbuild verify
112
113%install
114# jars
115#install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
116install -pD -T -m 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
117
118# pom
119install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
120install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
121
122%add_maven_depmap
123
124# javadoc
125install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
126cp -pr target/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
127
128# scripts
129install -pD -T -m 755 %{SOURCE2} %{buildroot}%{_bindir}/logfactor5
130install -pD -T -m 755 %{SOURCE5} %{buildroot}%{_bindir}/chainsaw
131
132# freedesktop.org menu entries and icons
133install -pD -T -m 644 %{SOURCE1} \
134 %{buildroot}%{_datadir}/pixmaps/logfactor5.png
135desktop-file-install \
136 --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
137 %{SOURCE3}
138
139install -pD -T -m 644 %{SOURCE4} \
140 %{buildroot}%{_datadir}/pixmaps/chainsaw.png
141desktop-file-install \
142 --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
143 %{SOURCE6}
144
145
146# DTD and the SGML catalog (XML catalog handled in scriptlets)
147install -pD -T -m 644 src/main/javadoc/org/apache/log4j/xml/doc-files/log4j.dtd \
148 %{buildroot}%{_datadir}/sgml/%{name}/log4j.dtd
149install -pD -T -m 644 %{SOURCE7} \
150 %{buildroot}%{_datadir}/sgml/%{name}/catalog
151
152# fix perl location
153%__perl -p -i -e 's|/opt/perl5/bin/perl|%{__perl}|' \
154contribs/KitchingSimon/udpserver.pl
155
156
157%post
158# Note that we're using versioned catalog, so this is always ok.
159if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
160 %{_bindir}/install-catalog --add \
161 %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
162 %{_datadir}/sgml/%{name}/catalog > /dev/null || :
163fi
164if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
165 %{_bindir}/xmlcatalog --noout --add system log4j.dtd \
166 file://%{_datadir}/sgml/%{name}/log4j.dtd %{_sysconfdir}/xml/catalog \
167 > /dev/null || :
168fi
169
170
171%preun
172if [ $1 -eq 0 ]; then
173 if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
174 %{_bindir}/xmlcatalog --noout --del log4j.dtd \
175 %{_sysconfdir}/xml/catalog > /dev/null || :
176 fi
177fi
178
179
180%postun
181# Note that we're using versioned catalog, so this is always ok.
182if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
183 %{_bindir}/install-catalog --remove \
184 %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
185 %{_datadir}/sgml/%{name}/catalog > /dev/null || :
186fi
187
188%files
189%doc LICENSE NOTICE
190%{_bindir}/*
191%{_javadir}/*
192%{_mavenpomdir}/JPP-%{name}.pom
193%{_mavendepmapfragdir}/*
194%{_datadir}/applications/*
195%{_datadir}/pixmaps/*
196%{_datadir}/sgml/%{name}
197
198%files manual
199%doc LICENSE NOTICE
200%doc site/*.html site/css site/images/ site/xref site/xref-test contribs
201
202%files javadoc
203%doc LICENSE NOTICE
204%doc %{_javadocdir}/%{name}
205
206
207%changelog
208* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2.17-3
209- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
210
211* Thu Jun 14 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.17-2
212- Remove "uses" OSGI directives from MANIFEST (related #826776)
213
214* Mon Jun 04 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.17-1
215- Update to latest version
216- Change OSGI bundle symbolic name to org.apache.log4j
217- Resolves #826776
218
219* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2.16-11
220- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
221
222* Fri Oct 28 2011 Alexander Kurtakov <akurtako@redhat.com> 0:1.2.16-10
223- Remove duplicate import-package declaration.
224- Adapt to current guidelines.
225- Remove no longer needed patches.
226
227* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2.16-9
228- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
229
230* Tue Jan 18 2011 Ville Skytt? <ville.skytta@iki.fi> - 0:1.2.16-8
231- Drop executable file mode bits from icons.
232
233* Fri Dec 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-7
234- Use package instead of install mvn target to fix build
235
236* Thu Dec 16 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.2.16-6
237- Do not require jaxp_parser_impl. Maven build is not using it all and it's provided by every Java5 JVM.
238
239* Thu Dec 9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-5
240- Add patch to fix ant groupId
241- Versionless jars & javadocs
242
243* Tue Sep 7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-4
244- Fix BRs to include ant-junit
245- Fix changed path for javadocs after build run
246
247* Thu Jul 8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-3
248- Add license to javadoc and manual subpackages
249
250* Fri May 28 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-2
251- Install pom file
252- Trim changelog
253- Add jpackage-utils to javadoc Requires
254
255* Mon May 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.2.16-1
256- Complete re-working of whole ebuild to work with maven
257- Rebase to new version
258- Drop gcj support
259
260* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2.14-6.3
261- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
262
263* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.2.14-5.3
264- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
265
266* Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.2.14-4.3
267- drop repotag
268
269* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.2.14-4jpp.2
270- fix license tag
271
272* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.2.14-4jpp.1
273- Autorebuild for GCC 4.3
274
275* Sat May 26 2007 Vivek Lakshmanan <vivekl@redhat.com> 0:1.2.14-3jpp.1
276- Upgrade to 1.2.14
277- Modify the categories for the .desktop files so they are only
278 displayed under the development/programming menus
279- Resolves: bug 241447
280
281* Fri May 11 2007 Jason Corley <jason.corley@gmail.com> 0:1.2.14-3jpp
282- rebuild through mock and centos 4
283- replace vendor and distribution with macros
284
285* Fri Apr 20 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2.14-2jpp
286- Patch to allow build of org.apache.log4j.jmx.* with mx4j
287- Restore Vendor: and Distribution:
288
289* Sat Feb 17 2007 Fernando Nasser <fnasser@redhat.com> - 0:1.2.14-1jpp
290- Upgrade
291
292* Mon Feb 12 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2.13-4jpp
293- Add bootstrap option to build core
294
295* Wed Aug 09 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.2.13-3jpp.2
296- Remove patch for BZ #157585 because it doesnt seem to be needed anymore.
297
298* Tue Aug 08 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.2.13-3jpp.1
299- Re-sync with latest from JPP.
300- Update patch for BZ #157585 to apply cleanly.
301- Partially adopt new naming convention.
302
303* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.2.13-2jpp_2fc
304- Rebuilt
305
306* Fri Jul 21 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.2.13-2jpp_1fc
307- Merge spec and patches with latest from JPP.
308- Clean source tar ball off prebuilt jars and classes.
309- Use classpathx-jaf and jms for buildrequires for the time being.
310
311* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.2.8-7jpp_9fc
312- rebuild
313
314* Mon Mar 6 2006 Jeremy Katz <katzj@redhat.com> - 0:1.2.8-7jpp_8fc
315- fix scriptlet spew
316
317* Wed Dec 21 2005 Jesse Keating <jkeating@redhat.com> 0:1.2.8-7jpp7fc
318- rebuilt again
319
320* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
321- rebuilt
322
323* Thu Nov 3 2005 Archit Shah <ashah@redhat.com> 0:1.2.8-7jpp_6fc
324- Reenable building of example that uses rmic
325
326* Wed Jun 22 2005 Gary Benson <gbenson@redhat.com> 0:1.2.8-7jpp_5fc
327- Reenable building of classes that require jms.
328- Remove classes and jarfiles from the tarball.
329
330* Mon May 23 2005 Gary Benson <gbenson@redhat.com> 0:1.2.8-7jpp_4fc
331- Work around chainsaw failure (#157585).
332
333* Tue Jan 11 2005 Gary Benson <gbenson@redhat.com> 0:1.2.8-7jpp_3fc
334- Reenable building of classes that require javax.swing (#130006).
335
336* Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> 0:1.2.8-7jpp_2fc
337- Build into Fedora.