cocor.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ##
  2. ## cocor.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_real 17
  27. %define V_here 1.07
  28. # package information
  29. Name: cocor
  30. Summary: LL(1) Recursive-Descent Compiler-Compiler
  31. URL: http://cs.ru.ac.za/homes/cspt/cocor.htm
  32. Vendor: Hanspeter Mössenböck, Frankie Arzu
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [EVAL]
  35. Group: Compiler
  36. License: Open Source
  37. Version: %{V_here}
  38. Release: 20020919
  39. # list of sources
  40. Source0: ftp://cs.ru.ac.za/pub/coco/cocorc%{V_real}.tgz
  41. Source1: ftp://cs.ru.ac.za/pub/coco/Coco.Paper.ps.Z
  42. Source2: ftp://cs.ru.ac.za/pub/coco/Coco.Report.ps.Z
  43. Source3: cocor.sh
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20020206
  48. PreReq: OpenPKG, openpkg >= 20020206
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. Coco/R combines the functionality of the well-known UNIX tools lex
  53. and yacc, to form an extremely easy to use compiler generator that
  54. generates recursive descent parsers, their associated scanners,
  55. and (in some versions) a driver program, from attributed grammars
  56. (written using EBNF syntax with attributes and semantic actions)
  57. which conform to the restrictions imposed by LL(1) parsing (rather
  58. than LALR parsing, as allowed by yacc). The user has to add modules
  59. for symbol table handling, optimization, and code generation
  60. in order to get a running compiler. Coco/R can also be used to
  61. construct other syntax-based applications that have less of a
  62. "compiler" flavour.
  63. %prep
  64. %setup -q -c
  65. %build
  66. cd sources
  67. %{l_make} %{l_mflags} -f unix.mk \
  68. CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_shtool} mkdir -f -p -m 755 \
  72. $RPM_BUILD_ROOT%{l_prefix}/bin \
  73. $RPM_BUILD_ROOT%{l_prefix}/libexec/cocor \
  74. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  75. $RPM_BUILD_ROOT%{l_prefix}/share/cocor/frames
  76. %{l_shtool} install -c -m 755 \
  77. -e 's;@l_prefix@;%{l_prefix};g' \
  78. %{SOURCE cocor.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/cocor
  79. %{l_shtool} install -c -s -m 755 \
  80. sources/cocor $RPM_BUILD_ROOT%{l_prefix}/libexec/cocor/
  81. %{l_shtool} install -c -m 644 \
  82. docs/cocor.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  83. %{l_shtool} install -c -m 644 \
  84. docs/cocol $RPM_BUILD_ROOT%{l_prefix}/share/cocor/cocor.lang.txt
  85. %{l_shtool} install -c -m 644 \
  86. docs/coco.use $RPM_BUILD_ROOT%{l_prefix}/share/cocor/cocor.use.txt
  87. %{l_shtool} install -c -m 644 \
  88. %{SOURCE Coco.Paper.ps.Z} $RPM_BUILD_ROOT%{l_prefix}/share/cocor/coco.paper.ps.Z
  89. %{l_shtool} install -c -m 644 \
  90. %{SOURCE Coco.Report.ps.Z} $RPM_BUILD_ROOT%{l_prefix}/share/cocor/coco.report.ps.Z
  91. %{l_shtool} install -c -m 644 \
  92. frames/*.frm $RPM_BUILD_ROOT%{l_prefix}/share/cocor/frames/
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT