llvm.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## llvm.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: llvm
  26. Summary: Low-Level Virtual Machine (LLVM)
  27. URL: http://llvm.org/
  28. Vendor: University of Illinois
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: EVAL
  32. Group: Compiler
  33. License: University of Illinois Open Source License
  34. Version: 2.1
  35. Release: 20070927
  36. # list of sources
  37. Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes
  42. PreReq: OpenPKG, openpkg >= 20060823
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Low Level Virtual Machine (LLVM) is a compilation strategy designed
  47. to enable effective program optimization across the entire lifetime
  48. of a program. LLVM supports effective optimization at compile time,
  49. link-time (particularly interprocedural), run-time and offline
  50. (i.e., after software is installed), while remaining transparent
  51. to developers and maintaining compatibility with existing build
  52. scripts. LLVM is a virtual instruction set. LLVM is a low-level
  53. object code representation that uses simple RISC-like instructions.
  54. LLVM provides a link-time optimization framework with a growing set
  55. of global and interprocedural analyses and transformations, static
  56. back-ends for the X86, X86-64, PowerPC 32/64, ARM, Thumb, IA-64,
  57. Alpha and SPARC architectures, a back-end which emits portable C
  58. code, and a Just-In-Time compiler for X86, X86-64, PowerPC 32/64
  59. processors.
  60. %track
  61. prog llvm = {
  62. version = %{version}
  63. url = http://llvm.org/releases/download.html
  64. regex = llvm-(__VER__)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q
  68. %build
  69. CC="%{l_cc}" \
  70. CXX="%{l_cxx}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. CXXFLAGS="%{l_cxxflags -O}" \
  73. CPPFLAGS="%{l_cppflags}" \
  74. LDFLAGS="%{l_ldflags}" \
  75. ./configure \
  76. --prefix=%{l_prefix}
  77. %{l_make} %{l_mflags -O}
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/share
  83. mv $RPM_BUILD_ROOT%{l_prefix}/docs/llvm \
  84. $RPM_BUILD_ROOT%{l_prefix}/share/llvm
  85. find $RPM_BUILD_ROOT%{l_prefix} -name ".dir" -type f -print | xargs rm -f
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} \
  89. '%config %{l_prefix}/etc/llvm/*'
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT