java_cup-vl.spec 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. # Copyright (c) 2000-2005, JPackage Project
  2. # All rights reserved.
  3. #
  4. # Redistribution and use in source and binary forms, with or without
  5. # modification, are permitted provided that the following conditions
  6. # are met:
  7. #
  8. # 1. Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the
  13. # distribution.
  14. # 3. Neither the name of the JPackage Project nor the names of its
  15. # contributors may be used to endorse or promote products derived
  16. # from this software without specific prior written permission.
  17. #
  18. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. #
  30. %define pkg_version 11a
  31. %define section free
  32. ##define with_bootstrap 0
  33. %define with_bootstrap 1
  34. Name: java_cup
  35. Version: 0.11a
  36. Release: 7%{?_dist_release}
  37. Summary: Java source interpreter
  38. Group: Development/Libraries
  39. License: MIT
  40. URL: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/
  41. #svn export -r 21 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11a
  42. #tar cjf java_cup-0.11a.tar.bz2 java_cup-0.11a/
  43. Source0: java_cup-0.11a.tar.bz2
  44. Source1: java_cup-pom.xml
  45. # Add OSGi manifests
  46. Source2: %{name}-MANIFEST.MF
  47. Source4: %{name}-runtime-MANIFEST.MF
  48. # Taken from http://www2.cs.tum.edu/projects/cup/
  49. Source3: LICENSE.txt
  50. Patch0: %{name}-build.patch
  51. Patch1: java_cup-0.11a-manifest.patch
  52. # Patch from eclipe-pdt to get around generated actions methods exceeding the 65535 bytes limit:
  53. # http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/tree/plugins/org.eclipse.php.core.parser/javacup10k_split_do_action_method.diff
  54. Patch2: javacup10k_split_do_action_method.diff
  55. BuildArch: noarch
  56. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  57. BuildRequires: ant
  58. BuildRequires: java-devel
  59. BuildRequires: jpackage-utils >= 1.5
  60. #BuildRequires: jflex
  61. %if !%{with_bootstrap}
  62. BuildRequires: java_cup >= 0.11a
  63. %endif
  64. BuildRequires: zip
  65. Requires: java-headless
  66. %description
  67. java_cup is a LALR Parser Generator for Java
  68. %package javadoc
  69. Summary: Javadoc for java_cup
  70. Summary(ja): java_cup の Javadoc
  71. Group: Documentation
  72. %description javadoc
  73. Javadoc for java_cup
  74. %package manual
  75. Summary: Documentation for java_cup
  76. Summary(ja): java_cup のドキュメント
  77. Group: Documentation
  78. %description manual
  79. Documentation for java_cup.
  80. %prep
  81. %setup -q
  82. %patch0 -b .build
  83. %patch1 -p1 -b .manifest
  84. pushd src
  85. %patch2 -p1 -b .orig
  86. popd
  87. cp %{SOURCE1} pom.xml
  88. cp %{SOURCE3} .
  89. # remove all binary files
  90. find -name "*.class" -delete
  91. %if ! %{with_bootstrap}
  92. # remove prebuilt JFlex
  93. rm -rf java_cup-0.11a/bin/JFlex.jar
  94. # remove prebuilt java_cup, if not bootstrapping
  95. rm -rf java_cup-0.11a/bin/java-cup-11.jar
  96. %endif
  97. %build
  98. %if !%{with_bootstrap}
  99. export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex)
  100. %endif
  101. ant
  102. find . -name parser.cup -exec rm {} \;
  103. ant javadoc
  104. %install
  105. rm -rf $RPM_BUILD_ROOT
  106. # inject OSGi manifests
  107. mkdir -p META-INF
  108. cp -p %{SOURCE2} META-INF/MANIFEST.MF
  109. touch META-INF/MANIFEST.MF
  110. zip -u dist/java-cup-%{pkg_version}.jar META-INF/MANIFEST.MF
  111. cp -p %{SOURCE4} META-INF/MANIFEST.MF
  112. touch META-INF/MANIFEST.MF
  113. zip -u dist/java-cup-%{pkg_version}-runtime.jar META-INF/MANIFEST.MF
  114. # jar
  115. install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
  116. install -m 644 dist/java-cup-%{pkg_version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
  117. install -m 644 dist/java-cup-%{pkg_version}-runtime.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime-%{version}.jar
  118. # poms
  119. #install -d -m 755 %{buildroot}%{_mavenpomdir}
  120. #install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
  121. #add_maven_depmap
  122. # javadoc
  123. install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
  124. cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
  125. %clean
  126. rm -rf $RPM_BUILD_ROOT
  127. #post
  128. #update_maven_depmap
  129. #postun
  130. #update_maven_depmap
  131. %files
  132. %defattr(0644,root,root,0755)
  133. %doc changelog.txt LICENSE.txt
  134. %{_javadir}/*
  135. %files manual
  136. %defattr(0644,root,root,0755)
  137. %doc manual.html LICENSE.txt
  138. %files javadoc
  139. %defattr(0644,root,root,0755)
  140. %doc LICENSE.txt
  141. %{_javadocdir}/%{name}
  142. %changelog
  143. * Sat Jan 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.11a-7
  144. - rebuilt on current VineSeed
  145. - added Patch1 and Patch2
  146. * Sat Jun 2 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11a-6
  147. - rebuilt with rpm-4.8.1-3
  148. - updated URL
  149. * Sat Sep 4 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11a-5
  150. - Initial build for Vine Linux
  151. * Mon Feb 15 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-4
  152. - Add maven pom and depmap.
  153. * Wed Jan 20 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-3
  154. - Fix bootstrap.
  155. * Sun Jan 17 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:0.11a-2
  156. - Rebuilt in non-bootstrap mode (removed all prebuilt jars).
  157. - Added BR: jflex and java_cup >= 1:0.11a for non-bootstrap mode
  158. - Remove unnecessary R(post,postun): coreutils
  159. * Fri Jan 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-1
  160. - Update to 0.11a.
  161. - Drop gcj_support.
  162. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.10k-3
  163. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  164. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.10k-2
  165. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  166. * Tue Jul 15 2008 Lubomir Rintel <lkundrak@v3.sk> - 1:0.10k-1
  167. - Fix the version to match upstream, so that FEver can be used
  168. * Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1:0.10-0.k.6.3
  169. - drop repotag
  170. * Sun Feb 17 2008 Lubomir Kundrak <lkundrak@redhat.com> - 1:0.10-0.k.6jpp.2
  171. - Ant task
  172. - Clean up to satisfy QA script and rpmlint
  173. * Fri Aug 04 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.6jpp.1
  174. - Re-sync with latest version from JPP.
  175. - Partially adopt new naming convention.
  176. * Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 1:0.10-0.k.5jpp_2fc
  177. - Rebuilt
  178. * Thu Jul 20 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.5jpp_1fc
  179. - Re-sync with latest version from JPP.
  180. * Wed Jul 19 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.4jpp_1fc
  181. - Conditional native compilation for GCJ.
  182. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_10fc
  183. - rebuild
  184. * Mon Mar 6 2006 Jeremy Katz <katzj@redhat.com> - 1:0.10-0.k.1jpp_9fc
  185. - stop scriptlet spew
  186. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_8fc
  187. - bump again for double-long bug on ppc(64)
  188. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_7fc
  189. - rebuilt for new gcc4.1 snapshot and glibc changes
  190. * Tue Jan 3 2006 Jesse Keating <jkeating@redhat.com> 1:0.10-0.k.1jpp_6fc
  191. - rebuilt again
  192. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  193. - rebuilt
  194. * Tue Jul 19 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_5fc
  195. - Build on ia64, ppc64, s390 and s390x.
  196. - Switch to aot-compile-rpm.
  197. * Tue Jun 28 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_4fc
  198. - BC-compile.
  199. * Tue Jun 21 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_3fc
  200. - Remove classes from the tarball.
  201. * Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_2fc
  202. - Build into Fedora.
  203. * Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 1:0.10-0.k.1jpp_1rh
  204. - RH vacuuming
  205. * Thu Jan 22 2004 David Walluck <david@anti-microsoft.org> 1:0.10-0.k.1jpp
  206. - fix version/release (bump epoch)
  207. - change License tag from Free to BSD-style
  208. - add Distribution tag
  209. - really update for JPackage 1.5
  210. * Wed Mar 26 2003 Paul Nasrat <pauln@truemesh.com> 0.10k-1jpp
  211. - for jpackage-utils 1.5
  212. - New spec reverse engineered from binary rpms