tinyap.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ##
  2. ## tinyap.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_opkg 1.4.0
  25. %define V_dist 1.4-0
  26. # package information
  27. Name: tinyap
  28. Summary: Recursive Descent Parser and Abstract Syntax Tree Walker
  29. URL: http://code.google.com/p/tinyap/
  30. Vendor: Damien Leroux
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: CompilerCompiler
  35. License: GPL
  36. Version: %{V_opkg}
  37. Release: 20080512
  38. # list of sources
  39. Source0: http://tinyap.googlecode.com/files/tinyap-%{V_dist}.tar.gz
  40. Patch0: tinyap.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20060823
  45. PreReq: OpenPKG, openpkg >= 20060823
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. This is not yet another parser. Tinyap takes some text and an a
  50. grammar describing AST as inputs, and outputs another AST that
  51. describes the text contents, according to the provided grammar.
  52. Basically, tinyap is a recursive descent parser with backup.
  53. Thus, it's able to recognize any LL(k) language. When a parse is
  54. successful, tinyap outputs an Abstract Syntax Tree (AST) that
  55. represents the input text in a structured manner. Unlike most
  56. parsers, its code isn't factory-calibrated for a particular grammar.
  57. Instead, the grammar is data. Tinyap uses an AST that represents
  58. a grammar to parse its input text. This grammar AST is structured
  59. according to tinyap's grammar description language.
  60. %track
  61. prog tinyap = {
  62. version = %{V_dist}
  63. url = http://code.google.com/p/tinyap/
  64. regex = tinyap-(__VER__)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q -n tinyap-%{V_dist}
  68. %patch -p0
  69. %build
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. ./configure \
  73. --prefix=%{l_prefix} \
  74. --disable-shared
  75. %{l_make} %{l_mflags -O}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  79. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  81. %files -f files
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT