antlr.spec 3.5 KB

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