antlr.spec 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ##
  2. ## antlr.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_antlr 3.2
  25. %define V_antlrworks 1.4
  26. # package information
  27. Name: antlr
  28. Summary: ANother Tool for Language Recognition (ANTLR)
  29. URL: http://www.antlr.org/
  30. Vendor: Terence Parr
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: CompilerCompiler
  35. License: GPL
  36. Version: %{V_antlr}
  37. Release: 20100513
  38. # list of sources
  39. Source0: http://www.antlr.org/download/antlr-%{V_antlr}.jar
  40. Source1: http://www.antlr.org/download/antlr-runtime-%{V_antlr}.jar
  41. Source2: http://www.antlr.org/download/antlrworks-%{V_antlrworks}.jar
  42. Source3: antlr.sh
  43. Source4: antlrworks.sh
  44. # build information
  45. BuildPreReq: OpenPKG, openpkg >= 20100101
  46. PreReq: OpenPKG, openpkg >= 20100101, java, JAVA-JDK
  47. %description
  48. ANother Tool for Language Recognition (ANTLR, formerly PCCTS)
  49. is a language tool that provides a framework for constructing
  50. recognizers, compilers, and translators from grammatical
  51. descriptions containing Java, C#, Python, or C++ actions. ANTLR
  52. is popular because it is easy to understand, powerful, flexible,
  53. generates human-readable output, and comes with complete source.
  54. ANTLR provides excellent support for tree construction, tree
  55. walking, and translation.
  56. %track
  57. prog antlr = {
  58. version = %{V_antlr}
  59. url = http://www.antlr.org/download.html
  60. regex = antlr-(__VER__)\.jar
  61. }
  62. prog antlr:antrlworks = {
  63. version = %{V_antlrworks}
  64. url = http://www.antlr.org/download.html
  65. regex = antlrworks-(__VER__)\.jar
  66. }
  67. %prep
  68. %setup -q -T -c
  69. %build
  70. %install
  71. %{l_shtool} mkdir -f -p -m 755 \
  72. $RPM_BUILD_ROOT%{l_prefix}/bin \
  73. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr
  74. %{l_shtool} install -c -m 644 \
  75. %{SOURCE antlr-%{V_antlr}.jar} \
  76. %{SOURCE antlr-runtime-%{V_antlr}.jar} \
  77. %{SOURCE antlrworks-%{V_antlrworks}.jar} \
  78. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr/
  79. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  80. %{SOURCE antlr.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlr
  81. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  82. %{SOURCE antlrworks.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlrworks
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  84. %files -f files
  85. %clean