antlr.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ##
  2. ## antlr.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2012 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.5
  25. %define V_antlrworks 1.5
  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: 20130106
  38. # list of sources
  39. Source0: http://www.antlr.org/download/antlr-%{V_antlr}-complete.jar
  40. Source1: http://www.antlr.org/download/antlrworks-%{V_antlrworks}.jar
  41. Source2: antlr.sh
  42. Source3: antlrworks.sh
  43. # build information
  44. BuildPreReq: OpenPKG, openpkg >= 20100101
  45. PreReq: OpenPKG, openpkg >= 20100101, java, JAVA-JDK
  46. %description
  47. ANother Tool for Language Recognition (ANTLR, formerly PCCTS)
  48. is a language tool that provides a framework for constructing
  49. recognizers, compilers, and translators from grammatical
  50. descriptions containing Java, C#, Python, or C++ actions. ANTLR
  51. is popular because it is easy to understand, powerful, flexible,
  52. generates human-readable output, and comes with complete source.
  53. ANTLR provides excellent support for tree construction, tree
  54. walking, and translation.
  55. %track
  56. prog antlr = {
  57. version = %{V_antlr}
  58. url = http://www.antlr.org/download.html
  59. regex = antlr-(__VER__)-complete\.jar
  60. }
  61. prog antlr:antrlworks = {
  62. version = %{V_antlrworks}
  63. url = http://www.antlr.org/download.html
  64. regex = antlrworks-(__VER__)\.jar
  65. }
  66. %prep
  67. %setup -q -T -c
  68. %build
  69. %install
  70. %{l_shtool} mkdir -f -p -m 755 \
  71. $RPM_BUILD_ROOT%{l_prefix}/bin \
  72. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr
  73. %{l_shtool} install -c -m 644 \
  74. %{SOURCE antlr-%{V_antlr}-complete.jar} \
  75. %{SOURCE antlrworks-%{V_antlrworks}.jar} \
  76. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr/
  77. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  78. %{SOURCE antlr.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlr
  79. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  80. %{SOURCE antlrworks.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlrworks
  81. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  82. %files -f files
  83. %clean