java_cup-vl.spec 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. ##VINE##define with_bootstrap 0
  33. %define with_bootstrap 1
  34. Name: java_cup
  35. Summary: LALR Parser Generator for Java
  36. Version: 0.11a
  37. Release: 5%{?_dist_release}
  38. Group: Development/Tools
  39. License: BSD and LGPLv2
  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. Patch0: %{name}-build.patch
  46. BuildArch: noarch
  47. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  48. BuildRequires: ant
  49. BuildRequires: jpackage-utils >= 1.5
  50. #BuildRequires: jflex
  51. %if !%{with_bootstrap}
  52. BuildRequires: java_cup >= 0.11a
  53. %endif
  54. # we still need openjdk for javadoc
  55. BuildRequires: java-1.6.0-openjdk-devel
  56. %description
  57. java_cup is a LALR Parser Generator for Java
  58. %package javadoc
  59. Summary: Javadoc for java_cup
  60. Group: Documentation
  61. %description javadoc
  62. Javadoc for java_cup
  63. %package manual
  64. Summary: Documentation for java_cup
  65. Group: Documentation
  66. %description manual
  67. Documentation for java_cup.
  68. %prep
  69. %setup -q
  70. %patch0 -b .sav
  71. cp %{SOURCE1} pom.xml
  72. # remove all binary files
  73. find . -name "*.class" -exec rm -f {} \;
  74. %if !%{with_bootstrap}
  75. # remove prebuilt JFlex
  76. rm -rf java_cup-0.11a/bin/JFlex.jar
  77. # remove prebuilt java_cup, if not bootstrapping
  78. rm -rf java_cup-0.11a/bin/java-cup-11.jar
  79. %endif
  80. %build
  81. %if !%{with_bootstrap}
  82. export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex)
  83. %endif
  84. ant
  85. find . -name parser.cup -exec rm {} \;
  86. ant javadoc
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. # jar
  90. install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
  91. install -m 644 dist/java-cup-%{pkg_version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
  92. install -m 644 dist/java-cup-%{pkg_version}-runtime.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime-%{version}.jar
  93. (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
  94. ln -sf ${jar} ${jar/-%{version}/}; done)
  95. # javadoc
  96. install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
  97. cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
  98. (cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})
  99. #add_to_maven_depmap java_cup java_cup %{version} JPP java_cup
  100. # poms
  101. install -d -m 755 %{buildroot}%{_mavenpomdir}
  102. install -pm 644 pom.xml \
  103. %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
  104. %clean
  105. rm -rf $RPM_BUILD_ROOT
  106. #post
  107. #update_maven_depmap
  108. #postun
  109. #update_maven_depmap
  110. %files
  111. %defattr(0644,root,root,0755)
  112. %doc changelog.txt
  113. %{_javadir}/*
  114. %{_mavenpomdir}/*
  115. #{_mavendepmapfragdir}/*
  116. %files manual
  117. %defattr(0644,root,root,0755)
  118. %doc manual.html
  119. %files javadoc
  120. %defattr(0644,root,root,0755)
  121. %doc %{_javadocdir}/%{name}-%{version}
  122. %doc %{_javadocdir}/%{name}
  123. %changelog
  124. * Sat Sep 4 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11a-5
  125. - Initial build for Vine Linux
  126. * Mon Feb 15 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-4
  127. - Add maven pom and depmap.
  128. * Wed Jan 20 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-3
  129. - Fix bootstrap.
  130. * Sun Jan 17 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 1:0.11a-2
  131. - Rebuilt in non-bootstrap mode (removed all prebuilt jars).
  132. - Added BR: jflex and java_cup >= 1:0.11a for non-bootstrap mode
  133. - Remove unnecessary R(post,postun): coreutils
  134. * Fri Jan 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-1
  135. - Update to 0.11a.
  136. - Drop gcj_support.
  137. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.10k-3
  138. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  139. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.10k-2
  140. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  141. * Tue Jul 15 2008 Lubomir Rintel <lkundrak@v3.sk> - 1:0.10k-1
  142. - Fix the version to match upstream, so that FEver can be used
  143. * Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1:0.10-0.k.6.3
  144. - drop repotag
  145. * Sun Feb 17 2008 Lubomir Kundrak <lkundrak@redhat.com> - 1:0.10-0.k.6jpp.2
  146. - Ant task
  147. - Clean up to satisfy QA script and rpmlint
  148. * Fri Aug 04 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.6jpp.1
  149. - Re-sync with latest version from JPP.
  150. - Partially adopt new naming convention.
  151. * Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 1:0.10-0.k.5jpp_2fc
  152. - Rebuilt
  153. * Thu Jul 20 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.5jpp_1fc
  154. - Re-sync with latest version from JPP.
  155. * Wed Jul 19 2006 Vivek Lakshmanan <vivekl@redhat.com> - 1:0.10-0.k.4jpp_1fc
  156. - Conditional native compilation for GCJ.
  157. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_10fc
  158. - rebuild
  159. * Mon Mar 6 2006 Jeremy Katz <katzj@redhat.com> - 1:0.10-0.k.1jpp_9fc
  160. - stop scriptlet spew
  161. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_8fc
  162. - bump again for double-long bug on ppc(64)
  163. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:0.10-0.k.1jpp_7fc
  164. - rebuilt for new gcc4.1 snapshot and glibc changes
  165. * Tue Jan 3 2006 Jesse Keating <jkeating@redhat.com> 1:0.10-0.k.1jpp_6fc
  166. - rebuilt again
  167. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  168. - rebuilt
  169. * Tue Jul 19 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_5fc
  170. - Build on ia64, ppc64, s390 and s390x.
  171. - Switch to aot-compile-rpm.
  172. * Tue Jun 28 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_4fc
  173. - BC-compile.
  174. * Tue Jun 21 2005 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_3fc
  175. - Remove classes from the tarball.
  176. * Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> 1:0.10-0.k.1jpp_2fc
  177. - Build into Fedora.
  178. * Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 1:0.10-0.k.1jpp_1rh
  179. - RH vacuuming
  180. * Thu Jan 22 2004 David Walluck <david@anti-microsoft.org> 1:0.10-0.k.1jpp
  181. - fix version/release (bump epoch)
  182. - change License tag from Free to BSD-style
  183. - add Distribution tag
  184. - really update for JPackage 1.5
  185. * Wed Mar 26 2003 Paul Nasrat <pauln@truemesh.com> 0.10k-1jpp
  186. - for jpackage-utils 1.5
  187. - New spec reverse engineered from binary rpms