PageRenderTime 44ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/log4j.spec

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