parrot.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ##
  2. ## parrot.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.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 information
  26. Name: parrot
  27. Summary: Parrot Virtual Machine
  28. URL: http://www.parrotcode.org/
  29. Vendor: Leo Tötsch et al.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Language
  34. License: Artistic/GPL
  35. Version: 0.1.2
  36. Release: 20050323
  37. # list of sources
  38. Source0: ftp://ftp.cpan.org/pub/CPAN/authors/id/L/LT/LTOETSCH/parrot-%{version}.tar.gz
  39. Patch0: parrot.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, gcc, flex, bison
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: gmp, icu
  46. PreReq: gmp, icu
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Parrot is a virtual machine designed to execute bytecode for
  51. interpreted languages efficiently. Parrot will be the target for the
  52. Perl 6 compiler.
  53. %track
  54. prog parrot = {
  55. version = %{version}
  56. url = ftp://ftp.cpan.org/pub/CPAN/authors/id/L/LT/LTOETSCH/
  57. regex = parrot-(__VER__)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q
  61. %patch -p0
  62. %build
  63. # configure program
  64. %{l_prefix}/bin/perl Configure.pl \
  65. --icu-config=%{l_prefix}/bin/icu-config \
  66. --debugging=0 \
  67. --optimize \
  68. --cc="%{l_cc}" \
  69. --cxx="%{l_cxx}" \
  70. --ccflags="%{l_cflags -O} %{l_cppflags icu .}" \
  71. --link="%{l_cxx}" \
  72. --linkflags="%{l_ldflags}" \
  73. --ld="%{l_cc}" \
  74. --ldflags="%{l_ldflags}" \
  75. --lex="flex" \
  76. --yacc="bison -y" \
  77. --libs=""
  78. # build program
  79. %{l_make} %{l_mflags} \
  80. parrot pdb pdump
  81. %install
  82. # install program
  83. rm -rf $RPM_BUILD_ROOT
  84. %{l_make} %{l_mflags} install \
  85. BUILDPREFIX=$RPM_BUILD_ROOT \
  86. PREFIX=%{l_prefix}/share/parrot \
  87. EXEC_PREFIX=%{l_prefix}/share/parrot \
  88. BIN_DIR=%{l_prefix}/bin \
  89. LIB_DIR=%{l_prefix}/lib \
  90. INCLUDE_DIR=%{l_prefix}/include
  91. # install headers (are not installed by default)
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/lib \
  94. $RPM_BUILD_ROOT%{l_prefix}/include/parrot
  95. cp -rp include/parrot/* $RPM_BUILD_ROOT%{l_prefix}/include/parrot/
  96. # strip down and adjust installation
  97. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/parrot/blib
  98. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  99. %{l_shtool} install -c -m 644 \
  100. blib/lib/libparrot.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  101. # determine installation files
  102. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  103. %files -f files
  104. %clean
  105. rm -rf $RPM_BUILD_ROOT