]>
Commit | Line | Data |
---|---|---|
bc88141a | 1 | # |
9556f4c9 | 2 | # Conditional build: |
5a7ac479 | 3 | %bcond_without lldb # LLDB debugger |
b0068ae4 | 4 | %bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization |
5a7ac479 JB |
5 | %bcond_without rt # compiler-rt libraries |
6 | %bcond_without ocaml # OCaml binding | |
b0068ae4 | 7 | %bcond_without doc # HTML docs and man pages |
5a7ac479 | 8 | %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default) |
8132e62b | 9 | %bcond_with tests # run tests |
9556f4c9 ER |
10 | |
11 | %ifarch s390 s390x sparc64 | |
12 | # No ocaml on these arches | |
13 | %undefine with_ocaml | |
14 | %endif | |
15 | ||
aa11c230 | 16 | Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure) |
2326a99f | 17 | Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego) |
aa11c230 | 18 | Name: llvm |
e3083bc4 | 19 | Version: 3.4.2 |
1628dc68 | 20 | Release: 1 |
aa11c230 | 21 | License: University of Illinois/NCSA Open Source License |
22 | Group: Development/Languages | |
dd9350c7 | 23 | #Source0Download: http://llvm.org/releases/download.html |
f981d747 | 24 | Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.gz |
e3083bc4 | 25 | # Source0-md5: a20669f75967440de949ac3b1bad439c |
c999855f | 26 | Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.gz |
e3083bc4 | 27 | # Source1-md5: 87945973b7c73038871c5f849a818588 |
5a7ac479 JB |
28 | Source2: http://llvm.org/releases/3.4/compiler-rt-3.4.src.tar.gz |
29 | # Source2-md5: 7938353e3a3bda85733a165e7ac4bb84 | |
30 | Source3: http://llvm.org/releases/3.4/lldb-3.4.src.tar.gz | |
31 | # Source3-md5: 7ed60a0463f9fdfa20db7109d4624cee | |
b0068ae4 JB |
32 | Source4: http://llvm.org/releases/3.4/polly-3.4.src.tar.gz |
33 | # Source4-md5: 5b2958c9076a584f710423bdca9e6d5d | |
34 | Source5: http://llvm.org/releases/3.4/clang-tools-extra-3.4.src.tar.gz | |
35 | # Source5-md5: fc25c6b90eaf8a9b0702940c7c57183c | |
ebde279d | 36 | Patch0: %{name}-config.patch |
d997b14b | 37 | # Data files should be installed with timestamps preserved |
ebde279d JB |
38 | Patch1: %{name}-2.6-timestamp.patch |
39 | Patch2: %{name}-pld.patch | |
2326a99f | 40 | URL: http://llvm.org/ |
ebde279d JB |
41 | BuildRequires: autoconf >= 2.60 |
42 | BuildRequires: automake >= 1:1.9.6 | |
bc88141a | 43 | BuildRequires: bash |
d997b14b | 44 | BuildRequires: bison |
d997b14b | 45 | BuildRequires: flex |
dd9350c7 JB |
46 | BuildRequires: gcc >= 5:3.4 |
47 | # gcc4 might be installed, but not current __cc | |
48 | %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4" | |
49 | BuildRequires: __cc >= 3.4 | |
9556f4c9 | 50 | %endif |
d997b14b | 51 | BuildRequires: groff |
bc88141a | 52 | BuildRequires: libltdl-devel |
ebde279d | 53 | BuildRequires: libtool >= 2:1.5.22 |
d997b14b AM |
54 | BuildRequires: libstdc++-devel >= 5:3.4 |
55 | BuildRequires: ocaml-ocamldoc | |
8132e62b | 56 | BuildRequires: perl-base >= 1:5.6 |
8c156e7d | 57 | BuildRequires: perl-tools-pod |
58 | BuildRequires: rpm-pythonprov | |
b0068ae4 | 59 | %{?with_doc:BuildRequires: sphinx-pdg} |
dd9350c7 JB |
60 | %if %{with apidocs} |
61 | BuildRequires: doxygen | |
62 | BuildRequires: graphviz | |
63 | %endif | |
64 | %if %{with tests} | |
65 | BuildRequires: dejagnu | |
66 | BuildRequires: python | |
67 | BuildRequires: tcl-devel | |
356a0bbd | 68 | %endif |
b0068ae4 JB |
69 | %if %{with polly} |
70 | BuildRequires: cloog-isl-devel | |
71 | BuildRequires: gmp-devel | |
72 | BuildRequires: isl-devel | |
73 | # optional | |
74 | #BuildRequires: libpluto-devel | |
75 | #BuildRequires: openscop-devel | |
76 | #BuildRequires: scoplib-devel | |
77 | #cuda-devel | |
78 | %endif | |
8c514f23 | 79 | Requires: %{name}-libs = %{version}-%{release} |
9556f4c9 ER |
80 | # LLVM is not supported on PPC64 |
81 | # http://llvm.org/bugs/show_bug.cgi?id=3729 | |
82 | ExcludeArch: ppc64 | |
aa11c230 | 83 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
84 | ||
356a0bbd | 85 | %define _sysconfdir /etc/%{name} |
021b3c3d | 86 | |
9556f4c9 ER |
87 | %define specflags_ppc -fno-var-tracking-assignments |
88 | ||
6832a5c5 ER |
89 | # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ... |
90 | %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\) | |
91 | ||
aa11c230 | 92 | %description |
93 | LLVM is a compiler infrastructure designed for compile-time, | |
94 | link-time, runtime, and idle-time optimization of programs from | |
95 | arbitrary programming languages. LLVM is written in C++ and has been | |
96 | developed since 2000 at the University of Illinois and Apple. It | |
621ec11f JB |
97 | currently supports compilation of C and C++ programs using clang |
98 | frontend. | |
aa11c230 | 99 | |
2326a99f JB |
100 | %description -l pl.UTF-8 |
101 | LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji | |
102 | czasu kompilowania, linkowania, działania i bezczynności programów w | |
103 | dowolnych językach programowania. Jest napisana w C++, rozwijana od | |
104 | roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje | |
621ec11f | 105 | kompilację programów w C i C++ przy użyciu frontendu clang. |
2326a99f | 106 | |
8c514f23 JB |
107 | %package libs |
108 | Summary: LLVM shared library | |
109 | Summary(pl.UTF-8): Biblioteka współdzielona LLVM-a | |
110 | Group: Libraries | |
111 | Conflicts: llvm < 3.2 | |
112 | ||
113 | %description libs | |
114 | LLVM shared library. | |
115 | ||
116 | %description libs -l pl.UTF-8 | |
117 | Biblioteka współdzielona LLVM-a. | |
118 | ||
bc88141a | 119 | %package devel |
621ec11f JB |
120 | Summary: Static libraries and header files for LLVM |
121 | Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a | |
bc88141a | 122 | Group: Development/Languages |
8c514f23 | 123 | Requires: %{name}-libs = %{version}-%{release} |
bc88141a ER |
124 | Requires: libstdc++-devel >= 6:3.4 |
125 | ||
126 | %description devel | |
621ec11f JB |
127 | This package contains static libraries and header files needed to |
128 | develop new native programs that use the LLVM infrastructure. | |
129 | ||
130 | %description devel -l pl.UTF-8 | |
131 | Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe | |
132 | potrzebne do tworzenia nowych programów natywnych wykorzystujących | |
133 | infrastrukturę LLVM. | |
bc88141a | 134 | |
9556f4c9 ER |
135 | %package doc |
136 | Summary: Documentation for LLVM | |
621ec11f | 137 | Summary(pl.UTF-8): Dokumentacja do LLVM-a |
9556f4c9 ER |
138 | Group: Documentation |
139 | # does not require base | |
bc88141a | 140 | |
9556f4c9 ER |
141 | %description doc |
142 | Documentation for the LLVM compiler infrastructure. | |
bc88141a | 143 | |
621ec11f JB |
144 | %description doc -l pl.UTF-8 |
145 | Dokumentacja do infrastruktury kompilatorów LLVM. | |
146 | ||
9556f4c9 ER |
147 | %package apidocs |
148 | Summary: API documentation for LLVM | |
621ec11f | 149 | Summary(pl.UTF-8): Dokumentacja API LLVM-a |
9556f4c9 ER |
150 | Group: Development/Languages |
151 | Requires: %{name}-doc = %{version}-%{release} | |
bc88141a | 152 | |
9556f4c9 ER |
153 | %description apidocs |
154 | API documentation for the LLVM compiler infrastructure. | |
bc88141a | 155 | |
621ec11f JB |
156 | %description apidocs -l pl.UTF-8 |
157 | Dokumentacja API infrastruktury kompilatorów LLVM. | |
158 | ||
b0068ae4 JB |
159 | %package polly |
160 | Summary: Polyhedral optimizations for LLVM | |
161 | Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a | |
162 | Group: Development/Tools | |
163 | URL: http://polly.llvm.org/ | |
164 | Requires: %{name} = %{version}-%{release} | |
165 | ||
166 | %description polly | |
167 | Polly is a high-level loop and data-locality optimizer and | |
168 | optimization infrastructure for LLVM. It uses an abstract mathematical | |
169 | representation based on integer polyhedra to analyze and optimize the | |
170 | memory access pattern of a program. | |
171 | ||
172 | %description polly -l pl.UTF-8 | |
173 | Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do | |
174 | optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną | |
175 | reprezentację matematyczną opartą na wielościanach całkowitoliczbowych | |
176 | do analizy i optymalizacji wzorców dostępu do pamięci przez program. | |
177 | ||
178 | %package polly-devel | |
179 | Summary: Header files for LLVM Polly optimization infrastructure | |
180 | Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly | |
181 | Group: Development/Libraries | |
182 | URL: http://polly.llvm.org/ | |
183 | Requires: %{name}-devel = %{version}-%{release} | |
184 | Requires: %{name}-polly = %{version}-%{release} | |
185 | ||
186 | %description polly-devel | |
187 | Header files for LLVM Polly optimization infrastructure. | |
188 | ||
189 | %description polly-devel -l pl.UTF-8 | |
190 | Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly. | |
191 | ||
d997b14b AM |
192 | %package -n clang |
193 | Summary: A C language family frontend for LLVM | |
621ec11f | 194 | Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C |
d997b14b AM |
195 | License: NCSA |
196 | Group: Development/Languages | |
8c514f23 | 197 | Requires: %{name} = %{version}-%{release} |
d997b14b AM |
198 | |
199 | %description -n clang | |
200 | clang: noun 1. A loud, resonant, metallic sound. 2. The strident call | |
201 | of a crane or goose. 3. C-language family front-end toolkit. | |
202 | ||
203 | The goal of the Clang project is to create a new C, C++, Objective C | |
204 | and Objective C++ front-end for the LLVM compiler. Its tools are built | |
205 | as libraries and designed to be loosely-coupled and extendable. | |
206 | ||
621ec11f JB |
207 | %description -n clang -l pl.UTF-8 |
208 | clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2. | |
209 | piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków | |
210 | z rodziny C. | |
211 | ||
212 | Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora | |
213 | LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są | |
214 | budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu | |
215 | i rozszerzaniu. | |
216 | ||
d997b14b AM |
217 | %package -n clang-analyzer |
218 | Summary: A source code analysis framework | |
621ec11f | 219 | Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego |
d997b14b AM |
220 | License: NCSA |
221 | Group: Development/Languages | |
222 | Requires: clang = %{version}-%{release} | |
223 | # not picked up automatically since files are currently not instaled | |
224 | # in standard Python hierarchies yet | |
225 | Requires: python | |
226 | ||
227 | %description -n clang-analyzer | |
228 | The Clang Static Analyzer consists of both a source code analysis | |
229 | framework and a standalone tool that finds bugs in C and Objective-C | |
230 | programs. The standalone tool is invoked from the command-line, and is | |
231 | intended to run in tandem with a build of a project or code base. | |
232 | ||
621ec11f JB |
233 | %description -n clang-analyzer -l pl.UTF-8 |
234 | Clang Static Analyzer składa się ze szkieletu do analizy kodu | |
235 | źródłowego oraz samodzielnego narzędzia znajdującego błędy w | |
236 | programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z | |
237 | myślą o uruchamianiu wraz z kompilacją projektu lub kodu. | |
238 | ||
9556f4c9 | 239 | %package -n clang-devel |
621ec11f JB |
240 | Summary: Header files for Clang |
241 | Summary(pl.UTF-8): Pliki nagłówkowe Clanga | |
9556f4c9 | 242 | Group: Development/Languages |
8c514f23 | 243 | Requires: %{name}-devel = %{version}-%{release} |
9556f4c9 ER |
244 | Requires: clang = %{version}-%{release} |
245 | ||
246 | %description -n clang-devel | |
247 | This package contains header files for the Clang compiler. | |
248 | ||
621ec11f JB |
249 | %description -n clang-devel -l pl.UTF-8 |
250 | Ten pakiet zawiera pliki nagłówkowe kompilatora Clang. | |
251 | ||
9556f4c9 ER |
252 | %package -n clang-doc |
253 | Summary: Documentation for Clang | |
621ec11f | 254 | Summary(pl.UTF-8): Dokumentacja do Clanga |
9556f4c9 ER |
255 | Group: Documentation |
256 | Requires: %{name} = %{version}-%{release} | |
257 | ||
258 | %description -n clang-doc | |
259 | Documentation for the Clang compiler front-end. | |
260 | ||
621ec11f JB |
261 | %description -n clang-doc -l pl.UTF-8 |
262 | Dokumentacja do frontendu kompilatora Clang. | |
263 | ||
9556f4c9 ER |
264 | %package -n clang-apidocs |
265 | Summary: API documentation for Clang | |
621ec11f | 266 | Summary(pl.UTF-8): Dokumentacja API Clanga |
9556f4c9 ER |
267 | Group: Development/Languages |
268 | Requires: clang-doc = %{version}-%{release} | |
269 | ||
270 | %description -n clang-apidocs | |
271 | API documentation for the Clang compiler. | |
272 | ||
621ec11f JB |
273 | %description -n clang-apidocs -l pl.UTF-8 |
274 | Dokumentacja API kompilatora Clang. | |
275 | ||
b0068ae4 JB |
276 | %package -n clang-tools-extra |
277 | Summary: Extra tools for Clang | |
278 | Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang | |
279 | Group: Development/Tools | |
280 | URL: http://clang.llvm.org/docs/ClangTools.html | |
281 | Requires: clang = %{version}-%{release} | |
282 | ||
283 | %description -n clang-tools-extra | |
284 | Extra tools for Clang. | |
285 | ||
286 | %description -n clang-tools-extra -l pl.UTF-8 | |
287 | Dodatkowe narzędzia do kompilatora Clang. | |
288 | ||
5a7ac479 JB |
289 | %package -n lldb |
290 | Summary: Next generation high-performance debugger | |
291 | Summary(pl.UTF-8): Wydajny debugger nowej generacji | |
292 | Group: Development/Debuggers | |
293 | Requires: %{name} = %{version}-%{release} | |
294 | ||
295 | %description -n lldb | |
296 | LLDB is a next generation, high-performance debugger. It is built as a | |
297 | set of reusable components which highly leverage existing libraries in | |
298 | the larger LLVM Project, such as the Clang expression parser and LLVM | |
299 | disassembler. | |
300 | ||
301 | %description -n lldb -l pl.UTF-8 | |
302 | LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o | |
303 | komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki | |
304 | w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz | |
305 | disasembler LLVM. | |
306 | ||
307 | %package -n lldb-devel | |
308 | Summary: Header files for LLDB | |
309 | Summary(pl.UTF-8): Pliki nagłówkowe LLDB | |
310 | Group: Development/Libraries | |
311 | Requires: %{name}-devel = %{version}-%{release} | |
312 | Requires: clang-devel = %{version}-%{release} | |
313 | Requires: lldb = %{version}-%{release} | |
314 | ||
315 | %description -n lldb-devel | |
316 | Header files for LLDB. | |
317 | ||
318 | %description -n lldb-devel -l pl.UTF-8 | |
319 | Pliki nagłówkowe LLDB. | |
320 | ||
9556f4c9 ER |
321 | %package ocaml |
322 | Summary: OCaml binding for LLVM | |
621ec11f JB |
323 | Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a |
324 | Group: Libraries | |
9556f4c9 ER |
325 | Requires: %{name} = %{version}-%{release} |
326 | %requires_eq ocaml-runtime | |
327 | ||
621ec11f | 328 | %description ocaml |
9556f4c9 ER |
329 | OCaml binding for LLVM. |
330 | ||
621ec11f JB |
331 | %description ocaml -l pl.UTF-8 |
332 | Wiązanie OCamla do LLVM-a. | |
333 | ||
9556f4c9 | 334 | %package ocaml-devel |
621ec11f JB |
335 | Summary: Development files for LLVM OCaml binding |
336 | Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a | |
9556f4c9 ER |
337 | Group: Development/Libraries |
338 | Requires: %{name}-devel = %{version}-%{release} | |
339 | Requires: %{name}-ocaml = %{version}-%{release} | |
340 | ||
341 | %description ocaml-devel | |
342 | The llvm-ocaml-devel package contains libraries and signature files | |
621ec11f JB |
343 | for developing applications that use llvm-ocaml binding. |
344 | ||
345 | %description ocaml-devel -l pl.UTF-8 | |
346 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
347 | wykorzystujących wiązanie llvm-ocaml. | |
348 | ||
9556f4c9 ER |
349 | %package ocaml-doc |
350 | Summary: Documentation for LLVM's OCaml binding | |
621ec11f | 351 | Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a |
9556f4c9 ER |
352 | Group: Documentation |
353 | Requires: %{name}-ocaml = %{version}-%{release} | |
354 | ||
355 | %description ocaml-doc | |
356 | HTML documentation for LLVM's OCaml binding. | |
357 | ||
621ec11f JB |
358 | %description ocaml-doc -l pl.UTF-8 |
359 | Dokumentacja HTML wiązania OCamla do LLVM-a. | |
360 | ||
aa11c230 | 361 | %prep |
b0068ae4 | 362 | %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 |
c999855f | 363 | mv cfe-%{version}.src tools/clang |
5a7ac479 JB |
364 | %{?with_rt:mv compiler-rt-3.4 projects/compiler-rt} |
365 | %{?with_lldb:mv lldb-3.4 tools/lldb} | |
b0068ae4 JB |
366 | %{?with_polly:mv polly-3.4 tools/polly} |
367 | mv clang-tools-extra-3.4 tools/clang/tools/extra | |
5a7ac479 | 368 | |
ebde279d JB |
369 | %patch0 -p1 |
370 | %patch1 -p1 | |
371 | %patch2 -p1 | |
ce9cc204 | 372 | |
19f21eee | 373 | # configure does not properly specify libdir |
3a1d4bb3 | 374 | %{__sed} -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in |
9206c2b1 JB |
375 | # clang resources |
376 | %{__sed} -i 's|(PROJ_prefix)/lib/|(PROJ_prefix)/%{_lib}/|g' tools/clang/lib/Headers/Makefile | |
377 | %{__sed} -i 's|"lib"|"%{_lib}"|' tools/clang/lib/Driver/Driver.cpp | |
19f21eee | 378 | |
bacc8b96 ER |
379 | grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{ |
380 | s,^#!.*bin/env python,#!%{__python}, | |
381 | s,^#!.*bin/env perl,#!%{__perl}, | |
382 | }' | |
383 | ||
9556f4c9 | 384 | install -d obj |
aa11c230 | 385 | |
386 | %build | |
ebde279d JB |
387 | cd autoconf |
388 | %{__aclocal} -I m4 | |
389 | %{__autoconf} -o ../configure configure.ac | |
390 | cd .. | |
391 | %{__autoheader} -I autoconf -I autoconf/m4 autoconf/configure.ac | |
392 | ||
d997b14b | 393 | # Disabling assertions now, rec. by pure and needed for OpenGTL |
9556f4c9 | 394 | # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801 |
d997b14b | 395 | # |
bc88141a | 396 | # bash specific 'test a < b' |
9556f4c9 | 397 | cd obj |
d997b14b | 398 | bash ../%configure \ |
bc88141a | 399 | --datadir=%{_datadir}/%{name}-%{version} \ |
632f3287 | 400 | --disable-assertions \ |
5a7ac479 | 401 | --enable-cxx11 \ |
d997b14b | 402 | %ifarch %{ix86} |
632f3287 | 403 | --disable-pic \ |
9556f4c9 | 404 | %endif |
632f3287 JB |
405 | --disable-static \ |
406 | --enable-bindings=%{?with_ocaml:ocaml}%{!?with_ocaml:none} \ | |
407 | --enable-debug-runtime \ | |
9556f4c9 ER |
408 | %if %{with apidocs} |
409 | --enable-doxygen \ | |
d997b14b | 410 | %endif |
25189042 | 411 | --enable-experimental-targets=R600 \ |
bc88141a | 412 | --enable-jit \ |
aa11c230 | 413 | --enable-optimized \ |
bc88141a ER |
414 | --enable-shared \ |
415 | --with-pic | |
416 | ||
d997b14b | 417 | %{__make} \ |
1628dc68 | 418 | VERBOSE=1 \ |
0a0b7076 | 419 | REQUIRES_RTTI=1 \ |
d997b14b | 420 | OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}" |
aa11c230 | 421 | |
827664e9 | 422 | %if %{with tests} |
9556f4c9 ER |
423 | %{__make} check 2>&1 | tee llvm-testlog.txt |
424 | %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt | |
425 | %endif | |
426 | ||
dd9350c7 JB |
427 | cd .. |
428 | ||
b0068ae4 | 429 | %if %{with doc} |
dd9350c7 | 430 | %{__make} -C docs -f Makefile.sphinx man |
b0068ae4 | 431 | %{__make} -C tools/clang/tools/extra/docs html |
dd9350c7 JB |
432 | %endif |
433 | ||
aa11c230 | 434 | %install |
435 | rm -rf $RPM_BUILD_ROOT | |
9556f4c9 | 436 | %{__make} -C obj -j1 install \ |
d997b14b | 437 | PROJ_docsdir=/moredocs \ |
aa11c230 | 438 | DESTDIR=$RPM_BUILD_ROOT |
439 | ||
d997b14b | 440 | # Static analyzer not installed by default: |
9556f4c9 ER |
441 | # http://clang-analyzer.llvm.org/installation#OtherPlatforms |
442 | install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer | |
d997b14b AM |
443 | # create launchers |
444 | for f in scan-{build,view}; do | |
9556f4c9 ER |
445 | ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f |
446 | cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer | |
d997b14b | 447 | done |
dd9350c7 | 448 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
8132e62b JB |
449 | %py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view |
450 | %py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view | |
451 | %py_postclean %{_libdir}/clang-analyzer/scan-view | |
d997b14b | 452 | |
b0068ae4 | 453 | %if %{with doc} |
dd9350c7 JB |
454 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
455 | cp -p docs/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
b0068ae4 JB |
456 | # these tools are not installed (llvm-prof has been removed before LLVM 3.4) |
457 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build,llvm-prof}.1 | |
458 | # make links | |
459 | echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1 | |
dd9350c7 JB |
460 | %endif |
461 | ||
d997b14b | 462 | # Move documentation back to build directory |
d997b14b AM |
463 | rm -rf moredocs |
464 | mv $RPM_BUILD_ROOT/moredocs . | |
ebde279d JB |
465 | %{__rm} -v moredocs/*.tar.gz |
466 | %{__rm} -v moredocs/ocamldoc/html/*.tar.gz | |
9556f4c9 ER |
467 | |
468 | # and separate the apidoc | |
469 | %if %{with apidocs} | |
470 | rm -rf apidoc clang-apidoc | |
471 | mv moredocs/html/doxygen apidoc | |
472 | cp -a tools/clang/docs/doxygen/html clang-apidoc | |
473 | %endif | |
d997b14b AM |
474 | |
475 | # And prepare Clang documentation | |
d997b14b | 476 | rm -rf clang-docs |
9556f4c9 | 477 | install -d clang-docs |
827664e9 | 478 | for f in LICENSE.TXT NOTES.txt README.txt; do |
9556f4c9 | 479 | ln tools/clang/$f clang-docs |
d997b14b | 480 | done |
021b3c3d | 481 | |
6832a5c5 | 482 | # Get rid of erroneously installed example files. |
ebde279d | 483 | %{__rm} -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.* |
6832a5c5 | 484 | |
d997b14b AM |
485 | # remove documentation makefiles: |
486 | # they require the build directory to work | |
9556f4c9 ER |
487 | rm -rf moredocs/examples |
488 | cp -a examples moredocs/examples | |
489 | find moredocs/examples -name Makefile | xargs -0r rm -f | |
6832a5c5 | 490 | |
aa11c230 | 491 | %clean |
492 | rm -rf $RPM_BUILD_ROOT | |
493 | ||
8c514f23 JB |
494 | %post libs -p /sbin/ldconfig |
495 | %postun libs -p /sbin/ldconfig | |
aa11c230 | 496 | |
5a7ac479 JB |
497 | %post -n clang -p /sbin/ldconfig |
498 | %postun -n clang -p /sbin/ldconfig | |
499 | ||
500 | %post -n lldb -p /sbin/ldconfig | |
501 | %postun -n lldb -p /sbin/ldconfig | |
502 | ||
aa11c230 | 503 | %files |
504 | %defattr(644,root,root,755) | |
8132e62b | 505 | %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt} |
a9beeab5 | 506 | %attr(755,root,root) %{_bindir}/bugpoint |
a9beeab5 JB |
507 | %attr(755,root,root) %{_bindir}/llc |
508 | %attr(755,root,root) %{_bindir}/lli | |
11b6f380 | 509 | %attr(755,root,root) %{_bindir}/lli-child-target |
8132e62b JB |
510 | %attr(755,root,root) %{_bindir}/llvm-ar |
511 | %attr(755,root,root) %{_bindir}/llvm-as | |
512 | %attr(755,root,root) %{_bindir}/llvm-bcanalyzer | |
827664e9 | 513 | %attr(755,root,root) %{_bindir}/llvm-cov |
8132e62b JB |
514 | %attr(755,root,root) %{_bindir}/llvm-diff |
515 | %attr(755,root,root) %{_bindir}/llvm-dis | |
827664e9 | 516 | %attr(755,root,root) %{_bindir}/llvm-dwarfdump |
8132e62b | 517 | %attr(755,root,root) %{_bindir}/llvm-extract |
8132e62b JB |
518 | %attr(755,root,root) %{_bindir}/llvm-link |
519 | %attr(755,root,root) %{_bindir}/llvm-mc | |
dd9350c7 | 520 | %attr(755,root,root) %{_bindir}/llvm-mcmarkup |
8132e62b JB |
521 | %attr(755,root,root) %{_bindir}/llvm-nm |
522 | %attr(755,root,root) %{_bindir}/llvm-objdump | |
8132e62b | 523 | %attr(755,root,root) %{_bindir}/llvm-ranlib |
f981d747 | 524 | %attr(755,root,root) %{_bindir}/llvm-readobj |
827664e9 PS |
525 | %attr(755,root,root) %{_bindir}/llvm-rtdyld |
526 | %attr(755,root,root) %{_bindir}/llvm-size | |
f981d747 | 527 | %attr(755,root,root) %{_bindir}/llvm-stress |
1628dc68 | 528 | %attr(755,root,root) %{_bindir}/llvm-symbolizer |
827664e9 | 529 | %attr(755,root,root) %{_bindir}/llvm-tblgen |
a7973f21 | 530 | %attr(755,root,root) %{_bindir}/macho-dump |
8132e62b | 531 | %attr(755,root,root) %{_bindir}/opt |
b0068ae4 | 532 | %if %{with doc} |
a9beeab5 | 533 | %{_mandir}/man1/bugpoint.1* |
a7973f21 | 534 | %{_mandir}/man1/lit.1* |
a9beeab5 JB |
535 | %{_mandir}/man1/llc.1* |
536 | %{_mandir}/man1/lli.1* | |
8132e62b JB |
537 | %{_mandir}/man1/llvm-ar.1* |
538 | %{_mandir}/man1/llvm-as.1* | |
539 | %{_mandir}/man1/llvm-bcanalyzer.1* | |
f981d747 | 540 | %{_mandir}/man1/llvm-cov.1* |
8132e62b JB |
541 | %{_mandir}/man1/llvm-diff.1* |
542 | %{_mandir}/man1/llvm-dis.1* | |
543 | %{_mandir}/man1/llvm-extract.1* | |
8132e62b JB |
544 | %{_mandir}/man1/llvm-link.1* |
545 | %{_mandir}/man1/llvm-nm.1* | |
8132e62b | 546 | %{_mandir}/man1/llvm-ranlib.1* |
c999855f | 547 | %{_mandir}/man1/llvm-readobj.1* |
f981d747 | 548 | %{_mandir}/man1/llvm-stress.1* |
1628dc68 | 549 | %{_mandir}/man1/llvm-symbolizer.1* |
a9beeab5 | 550 | %{_mandir}/man1/opt.1* |
dd9350c7 | 551 | %{_mandir}/man1/tblgen.1* |
b0068ae4 | 552 | %endif |
bc88141a | 553 | |
8c514f23 JB |
554 | %files libs |
555 | %defattr(644,root,root,755) | |
c999855f | 556 | %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so |
11b6f380 | 557 | %attr(755,root,root) %{_libdir}/libLLVM-3.4.so |
8c514f23 | 558 | |
bc88141a ER |
559 | %files devel |
560 | %defattr(644,root,root,755) | |
561 | %attr(755,root,root) %{_bindir}/llvm-config | |
8132e62b | 562 | %{_libdir}/libLLVM*.a |
1655c8b5 | 563 | %ifarch %{x8664} |
0a8510f2 | 564 | %attr(755,root,root) %{_libdir}/BugpointPasses.so |
19f21eee | 565 | %attr(755,root,root) %{_libdir}/libLTO.so |
8132e62b | 566 | %{_libdir}/libLTO.a |
1655c8b5 | 567 | %endif |
8132e62b JB |
568 | %{_includedir}/llvm |
569 | %{_includedir}/llvm-c | |
b0068ae4 | 570 | %if %{with doc} |
8132e62b | 571 | %{_mandir}/man1/llvm-config.1* |
b0068ae4 | 572 | %endif |
bc88141a | 573 | |
9556f4c9 ER |
574 | %files doc |
575 | %defattr(644,root,root,755) | |
576 | %doc moredocs/examples moredocs/html | |
577 | ||
578 | %if %{with apidocs} | |
579 | %files apidocs | |
580 | %defattr(644,root,root,755) | |
581 | %doc apidoc/* | |
582 | %endif | |
583 | ||
b0068ae4 JB |
584 | %if %{with polly} |
585 | %files polly | |
586 | %defattr(644,root,root,755) | |
587 | %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} | |
588 | %attr(755,root,root) %{_libdir}/LLVMPolly.so | |
589 | ||
590 | %files polly-devel | |
591 | %defattr(644,root,root,755) | |
592 | %{_libdir}/libpolly*.a | |
593 | %{_includedir}/polly | |
594 | %endif | |
595 | ||
d997b14b | 596 | %files -n clang |
bc88141a | 597 | %defattr(644,root,root,755) |
827664e9 | 598 | %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt} |
dd9350c7 | 599 | %attr(755,root,root) %{_bindir}/c-index-test |
8132e62b JB |
600 | %attr(755,root,root) %{_bindir}/clang |
601 | %attr(755,root,root) %{_bindir}/clang++ | |
dd9350c7 | 602 | %attr(755,root,root) %{_bindir}/clang-check |
1628dc68 | 603 | %attr(755,root,root) %{_bindir}/clang-format |
827664e9 | 604 | %attr(755,root,root) %{_bindir}/clang-tblgen |
b3a27ca2 | 605 | %attr(755,root,root) %{_libdir}/libclang.so |
5a7ac479 JB |
606 | %dir %{_libdir}/clang |
607 | %dir %{_libdir}/clang/%{version} | |
608 | %{_libdir}/clang/%{version}/include | |
609 | %if %{with rt} | |
610 | %{_libdir}/clang/%{version}/lib | |
611 | %endif | |
8132e62b | 612 | %{_mandir}/man1/clang.1* |
d997b14b AM |
613 | |
614 | %files -n clang-analyzer | |
bc88141a | 615 | %defattr(644,root,root,755) |
d997b14b AM |
616 | %attr(755,root,root) %{_bindir}/scan-build |
617 | %attr(755,root,root) %{_bindir}/scan-view | |
dd9350c7 | 618 | %{_mandir}/man1/scan-build.1* |
ae49e501 | 619 | %dir %{_libdir}/clang-analyzer |
d997b14b | 620 | |
9556f4c9 ER |
621 | %dir %{_libdir}/clang-analyzer/scan-build |
622 | %{_libdir}/clang-analyzer/scan-build/*.css | |
623 | %{_libdir}/clang-analyzer/scan-build/*.js | |
624 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build | |
625 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer | |
626 | ||
8132e62b JB |
627 | %dir %{_libdir}/clang-analyzer/scan-view |
628 | %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view | |
629 | %{_libdir}/clang-analyzer/scan-view/Resources | |
630 | %{_libdir}/clang-analyzer/scan-view/*.py[co] | |
631 | ||
9556f4c9 ER |
632 | %files -n clang-devel |
633 | %defattr(644,root,root,755) | |
8132e62b | 634 | %{_libdir}/libclang*.a |
9556f4c9 ER |
635 | %{_includedir}/clang |
636 | %{_includedir}/clang-c | |
637 | ||
638 | %files -n clang-doc | |
639 | %defattr(644,root,root,755) | |
8132e62b | 640 | %doc tools/clang/docs/*.{css,html,png,txt} |
9556f4c9 ER |
641 | |
642 | %if %{with apidocs} | |
643 | %files -n clang-apidocs | |
644 | %defattr(644,root,root,755) | |
645 | %doc clang-apidoc/* | |
646 | %endif | |
647 | ||
b0068ae4 JB |
648 | %files -n clang-tools-extra |
649 | %defattr(644,root,root,755) | |
650 | %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt,docs/_build/html/{*.html,*.js,_static}} | |
651 | %attr(755,root,root) %{_bindir}/clang-apply-replacements | |
652 | %attr(755,root,root) %{_bindir}/clang-modernize | |
653 | %attr(755,root,root) %{_bindir}/clang-tidy | |
654 | %attr(755,root,root) %{_bindir}/pp-trace | |
655 | %{_libdir}/libmodernizeCore.a | |
656 | ||
5a7ac479 JB |
657 | %if %{with lldb} |
658 | %files -n lldb | |
659 | %defattr(644,root,root,755) | |
660 | %attr(755,root,root) %{_bindir}/lldb | |
661 | %attr(755,root,root) %{_bindir}/lldb-platform | |
662 | %attr(755,root,root) %{_libdir}/liblldb.so | |
663 | ||
664 | %files -n lldb-devel | |
665 | %defattr(644,root,root,755) | |
666 | %{_libdir}/liblldb*.a | |
667 | %{_includedir}/lldb | |
668 | %endif | |
669 | ||
9556f4c9 | 670 | %if %{with ocaml} |
d997b14b AM |
671 | %files ocaml |
672 | %defattr(644,root,root,755) | |
11b6f380 JB |
673 | %{_libdir}/ocaml/META.llvm* |
674 | %attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so | |
8132e62b JB |
675 | %{_libdir}/ocaml/llvm*.cma |
676 | %{_libdir}/ocaml/llvm*.cmi | |
d997b14b AM |
677 | |
678 | %files ocaml-devel | |
679 | %defattr(644,root,root,755) | |
bc8a0b58 | 680 | %{_libdir}/libllvm*.a |
8132e62b JB |
681 | %{_libdir}/ocaml/libLLVM*.a |
682 | %{_libdir}/ocaml/libllvm*.a | |
683 | %{_libdir}/ocaml/llvm*.a | |
684 | %{_libdir}/ocaml/llvm*.cmx* | |
685 | %{_libdir}/ocaml/llvm*.mli | |
9556f4c9 ER |
686 | |
687 | %files ocaml-doc | |
688 | %defattr(644,root,root,755) | |
689 | %doc moredocs/ocamldoc/html/* | |
690 | %endif |