antlr.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## antlr.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 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.3
  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: 20090928
  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. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130
  48. PreReq: OpenPKG, openpkg >= 20040130, java, JAVA-JDK
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. ANother Tool for Language Recognition (ANTLR, formerly PCCTS)
  53. is a language tool that provides a framework for constructing
  54. recognizers, compilers, and translators from grammatical
  55. descriptions containing Java, C#, Python, or C++ actions. ANTLR
  56. is popular because it is easy to understand, powerful, flexible,
  57. generates human-readable output, and comes with complete source.
  58. ANTLR provides excellent support for tree construction, tree
  59. walking, and translation.
  60. %track
  61. prog antlr = {
  62. version = %{V_antlr}
  63. url = http://www.antlr.org/download.html
  64. regex = antlr-(__VER__)\.jar
  65. }
  66. prog antlr:antrlworks = {
  67. version = %{V_antlrworks}
  68. url = http://www.antlr.org/download.html
  69. regex = antlrworks-(__VER__)\.jar
  70. }
  71. %prep
  72. %setup -q -T -c
  73. %build
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/bin \
  78. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr
  79. %{l_shtool} install -c -m 644 \
  80. %{SOURCE antlr-%{V_antlr}.jar} \
  81. %{SOURCE antlr-runtime-%{V_antlr}.jar} \
  82. %{SOURCE antlrworks-%{V_antlrworks}.jar} \
  83. $RPM_BUILD_ROOT%{l_prefix}/libexec/antlr/
  84. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  85. %{SOURCE antlr.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlr
  86. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  87. %{SOURCE antlrworks.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/antlrworks
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT