parrot.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. ##
  2. ## parrot.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2010 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 information
  24. Name: parrot
  25. Summary: Parrot Virtual Machine
  26. URL: http://www.parrot.org/
  27. Vendor: Leo Tötsch et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Language
  32. License: Artistic/GPL
  33. Version: 2.3.0
  34. Release: 20100423
  35. # package options
  36. %option with_gmp yes
  37. %option with_pcre yes
  38. %option with_crypto no
  39. %option with_icu no
  40. # list of sources
  41. Source0: ftp://ftp.parrot.org/pub/parrot/releases/stable/%{version}/parrot-%{version}.tar.gz
  42. Patch0: parrot.patch
  43. # build information
  44. BuildPreReq: OpenPKG, openpkg >= 20100101, perl, gcc, flex, bison, make
  45. PreReq: OpenPKG, openpkg >= 20100101
  46. %if "%{with_gmp}" == "yes"
  47. BuildPreReq: gmp
  48. PreReq: gmp
  49. %endif
  50. %if "%{with_pcre}" == "yes"
  51. BuildPreReq: pcre
  52. PreReq: pcre
  53. %endif
  54. %if "%{with_crypto}" == "yes"
  55. BuildPreReq: openssl
  56. PreReq: openssl
  57. %endif
  58. %if "%{with_icu}" == "yes"
  59. BuildPreReq: icu
  60. PreReq: icu
  61. %endif
  62. %description
  63. Parrot is a virtual machine designed to execute bytecode for
  64. interpreted languages efficiently. Parrot will be the target for the
  65. Perl 6 compiler.
  66. %track
  67. prog parrot = {
  68. version = %{version}
  69. url = ftp://ftp.parrot.org/pub/parrot/releases/stable/
  70. regex = (\d+\.\d+\.\d+)/
  71. }
  72. %prep
  73. %setup -q
  74. %patch -p0
  75. %build
  76. # configure program
  77. %{l_shtool} subst \
  78. -e 's;has_dynamic_linking *=> *1;has_dynamic_linking => 0;g' \
  79. -e 's;parrot_is_shared *=> *1;parrot_is_shared => 0;g' \
  80. config/init/hints/*.pm
  81. %{l_prefix}/bin/perl Configure.pl \
  82. --prefix=%{l_prefix} \
  83. --debugging=0 \
  84. --optimize \
  85. --cc="%{l_cc}" \
  86. --cxx="%{l_cxx}" \
  87. --ccflags="%{l_cflags -O} %{l_cppflags icu .}" \
  88. --link="%{l_cxx}" \
  89. --linkflags="%{l_ldflags}" \
  90. --ld="%{l_cc}" \
  91. --ldflags="%{l_ldflags}" \
  92. --lex="%{l_prefix}/bin/flex" \
  93. --yacc="%{l_prefix}/bin/bison -y" \
  94. --make="%{l_make}" \
  95. --libs="" \
  96. --jitcapable \
  97. --execcapable \
  98. %if "%{with_gmp}" != "yes"
  99. --without-gmp \
  100. %endif
  101. %if "%{with_pcre}" != "yes"
  102. --without-pcre \
  103. %endif
  104. %if "%{with_crypto}" != "yes"
  105. --without-crypto \
  106. %endif
  107. %if "%{with_icu}" == "yes"
  108. --icu-config=%{l_prefix}/bin/icu-config \
  109. %else
  110. --without-icu \
  111. %endif
  112. --without-gdbm \
  113. --without-gettext \
  114. --without-readline \
  115. --without-opengl
  116. # build program
  117. %{l_make} %{l_mflags}
  118. %install
  119. # install program
  120. rm -rf $RPM_BUILD_ROOT
  121. %{l_make} %{l_mflags} install \
  122. DESTDIR=$RPM_BUILD_ROOT
  123. # strip down and adjust installation
  124. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/parrot/blib
  125. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  126. mv $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/parrot/*/parrot.pc \
  127. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/parrot.pc
  128. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/parrot
  129. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  130. # determine installation files
  131. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  132. %files -f files
  133. %clean