sablecc.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. ##
  2. ## sablecc.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_opkg 3.4
  25. %define V_dist 3.4
  26. # package information
  27. Name: sablecc
  28. Summary: Parser Generator for Java
  29. URL: http://sablecc.org/
  30. Vendor: Etienne M. Gagnon
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: CompilerCompiler
  35. License: Apache
  36. Version: %{V_opkg}
  37. Release: 20120724
  38. # list of sources
  39. Source0: http://switch.dl.sourceforge.net/sablecc/sablecc-%{V_dist}.zip
  40. # build information
  41. BuildPreReq: OpenPKG, openpkg >= 20100101, infozip
  42. PreReq: OpenPKG, openpkg >= 20100101, java
  43. %description
  44. SableCC is a parser generator which generates fully featured
  45. object-oriented frameworks for Java for building compilers,
  46. interpreters and other text parsers. In particular, generated
  47. frameworks include intuitive strictly-typed abstract syntax trees
  48. and tree walkers. SableCC also keeps a clean separation between
  49. machine-generated code and user-written code which leads to a
  50. shorter development cycle.
  51. %track
  52. prog sablecc = {
  53. version = %{V_dist}
  54. url = http://sourceforge.net/projects/sablecc/files/
  55. regex = sablecc-(\d+\.\d+|\d+-beta\.\d+)\.zip
  56. }
  57. %prep
  58. %setup -q -T -c
  59. unzip -q -x %{SOURCE0}
  60. %build
  61. ( echo "#!/bin/sh"
  62. echo "exec %{l_prefix}/bin/java \\%{l_nil}"
  63. echo " -jar %{l_prefix}/libexec/sablecc/sablecc.jar \\%{l_nil}"
  64. echo " \${1+\"\$@\"}"
  65. ) >sablecc
  66. %install
  67. %{l_shtool} mkdir -f -p -m 755 \
  68. $RPM_BUILD_ROOT%{l_prefix}/bin \
  69. $RPM_BUILD_ROOT%{l_prefix}/libexec/sablecc
  70. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  71. sablecc $RPM_BUILD_ROOT%{l_prefix}/bin/
  72. %{l_shtool} install -c -m 644 \
  73. sablecc-*/lib/sablecc.jar \
  74. $RPM_BUILD_ROOT%{l_prefix}/libexec/sablecc/
  75. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  76. %files -f files
  77. %clean