]> git.pld-linux.org Git - packages/llvm.git/blob - llvm.spec
package files new in 3.9.0
[packages/llvm.git] / llvm.spec
1 # TODO:
2 # - move and package:
3 #       %{_datadir}/clang/clang-format-sublime.py - sublime plugin
4 #       %{_datadir}/clang/clang-format.el - emacs mode
5 #       %{_datadir}/clang/clang-format.py - vim plugin
6 # - no content in doc package (it used to contain parts of clang apidocs and some examples)
7 # - system isl in polly?
8 #
9 # Conditional build:
10 %bcond_without  lldb            # LLDB debugger
11 %bcond_without  polly           # Polly cache-locality optimization, auto-parallelism and vectorization
12 %bcond_without  rt              # compiler-rt libraries
13 %bcond_without  multilib        # compiler-rt multilib libraries
14 %bcond_without  ocaml           # OCaml binding
15 %bcond_without  doc             # HTML docs and man pages
16 %bcond_with     apidocs         # doxygen docs (HUGE, so they are not built by default)
17 %bcond_with     tests           # run tests
18
19 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
20 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
21 %undefine       with_ocaml
22 %endif
23
24 Summary:        The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
25 Summary(pl.UTF-8):      Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
26 Name:           llvm
27 Version:        3.9.0
28 Release:        0.1
29 License:        University of Illinois/NCSA Open Source License
30 Group:          Development/Languages
31 #Source0Download: http://llvm.org/releases/download.html
32 Source0:        http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
33 # Source0-md5:  f2093e98060532449eb7d2fcfd0bc6c6
34 Source1:        http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
35 # Source1-md5:  29e1d86bee422ab5345f5e9fb808d2dc
36 Source2:        http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
37 # Source2-md5:  b7ea34c9d744da16ffc0217b6990d095
38 Source3:        http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
39 # Source3-md5:  968d053c3c3d7297983589164c6999e9
40 Source4:        http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz
41 # Source4-md5:  1cf328cbae25267749b68cfa6f113674
42 Source5:        http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
43 # Source5-md5:  f4f663068c77fc742113211841e94d5e
44 Source6:        http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz
45 # Source6-md5:  c23c895c0d855a0dc426af686538a95e
46 Patch0:         %{name}-lld-link.patch
47 Patch1:         %{name}-pld.patch
48 Patch2:         libdir.patch
49 Patch3:         x32-gcc-toolchain.patch
50 Patch4:         cmake-buildtype.patch
51 Patch5:         %{name}-ocaml-shared.patch
52 URL:            http://llvm.org/
53 BuildRequires:  bash
54 BuildRequires:  bison
55 BuildRequires:  cmake >= 3.4.3
56 BuildRequires:  flex
57 BuildRequires:  gcc >= 5:3.4
58 # gcc4 might be installed, but not current __cc
59 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
60 BuildRequires:  __cc >= 3.4
61 %endif
62 %ifarch x32
63 BuildRequires:  glibc-devel(x86_64)
64 %endif
65 BuildRequires:  groff
66 BuildRequires:  libedit-devel
67 BuildRequires:  libltdl-devel
68 BuildRequires:  libstdc++-devel >= 5:3.4
69 BuildRequires:  ncurses-devel
70 %if %{with ocaml}
71 BuildRequires:  ocaml-ctypes-devel >= 0.4
72 BuildRequires:  ocaml-findlib
73 BuildRequires:  ocaml-ocamldoc
74 BuildRequires:  ocaml-ounit
75 %endif
76 BuildRequires:  perl-base >= 1:5.6
77 BuildRequires:  perl-tools-pod
78 BuildRequires:  python >= 1:2.7
79 BuildRequires:  rpm-pythonprov
80 %{?with_doc:BuildRequires:      sphinx-pdg}
81 BuildRequires:  tar >= 1:1.22
82 BuildRequires:  xz
83 BuildRequires:  zlib-devel
84 %if %{with apidocs}
85 BuildRequires:  doxygen
86 BuildRequires:  graphviz
87 %endif
88 %if %{with tests}
89 BuildRequires:  dejagnu
90 BuildRequires:  tcl-devel
91 %endif
92 %if %{with rt} && %{with multilib}
93 %ifarch %{x8664}
94 BuildRequires:  gcc-c++-multilib-32
95 BuildRequires:  libstdc++-multilib-32-devel
96 %endif
97 %ifarch x32
98 BuildRequires: gcc-c++-multilib-32
99 BuildRequires: libstdc++-multilib-32-devel
100 BuildRequires: gcc-c++-multilib-64
101 BuildRequires: libstdc++-multilib-64-devel
102 %endif
103 %endif
104 %if %{with lldb}
105 BuildRequires:  epydoc
106 %ifarch i386 i486
107 BuildRequires:  libatomic-devel
108 %endif
109 BuildRequires:  libxml2-devel >= 2
110 BuildRequires:  ncurses-ext-devel
111 BuildRequires:  python-devel >= 2
112 BuildRequires:  swig-python
113 %endif
114 %if %{with polly}
115 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
116 # private copy in polly/lib/External/isl
117 #BuildRequires: isl-devel >= 0.15
118 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
119 %endif
120 %if %{with ocaml}
121 BuildConflicts: llvm-ocaml
122 %endif
123 Requires:       %{name}-libs = %{version}-%{release}
124 # LLVM is not supported on PPC64
125 # http://llvm.org/bugs/show_bug.cgi?id=3729
126 ExcludeArch:    ppc64
127 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128
129 %define         abi     3.9
130 %define         _sysconfdir     /etc/%{name}
131
132 %define         specflags_ppc   -fno-var-tracking-assignments
133
134 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
135 %define         _noautostrip    .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
136
137 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
138 # -Werror=format-security is for swig
139 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
140 %define         filterout_c     -fvar-tracking-assignments
141 %define         filterout_cxx   -fvar-tracking-assignments -Werror=format-security
142 %define         filterout_ccpp  -fvar-tracking-assignments
143
144 # std::__once_call, std::__once_callable non-function symbols
145 %define         skip_post_check_so      liblldb.so.*
146
147 %description
148 LLVM is a compiler infrastructure designed for compile-time,
149 link-time, runtime, and idle-time optimization of programs from
150 arbitrary programming languages. LLVM is written in C++ and has been
151 developed since 2000 at the University of Illinois and Apple. It
152 currently supports compilation of C and C++ programs using clang
153 frontend.
154
155 %description -l pl.UTF-8
156 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
157 czasu kompilowania, linkowania, działania i bezczynności programów w
158 dowolnych językach programowania. Jest napisana w C++, rozwijana od
159 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
160 kompilację programów w C i C++ przy użyciu frontendu clang.
161
162 %package libs
163 Summary:        LLVM shared libraries
164 Summary(pl.UTF-8):      Biblioteki współdzielone LLVM-a
165 Group:          Libraries
166 Conflicts:      llvm < 3.2
167
168 %description libs
169 LLVM shared libraries.
170
171 %description libs -l pl.UTF-8
172 Biblioteki współdzielone LLVM-a.
173
174 %package devel
175 Summary:        Static libraries and header files for LLVM
176 Summary(pl.UTF-8):      Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
177 Group:          Development/Languages
178 Requires:       %{name}-libs = %{version}-%{release}
179 Requires:       libstdc++-devel >= 6:3.4
180
181 %description devel
182 This package contains static libraries and header files needed to
183 develop new native programs that use the LLVM infrastructure.
184
185 %description devel -l pl.UTF-8
186 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
187 potrzebne do tworzenia nowych programów natywnych wykorzystujących
188 infrastrukturę LLVM.
189
190 %package doc
191 Summary:        Documentation for LLVM
192 Summary(pl.UTF-8):      Dokumentacja do LLVM-a
193 Group:          Documentation
194 # does not require base
195
196 %description doc
197 Documentation for the LLVM compiler infrastructure.
198
199 %description doc -l pl.UTF-8
200 Dokumentacja do infrastruktury kompilatorów LLVM.
201
202 %package apidocs
203 Summary:        API documentation for LLVM
204 Summary(pl.UTF-8):      Dokumentacja API LLVM-a
205 Group:          Development/Languages
206 Requires:       %{name}-doc = %{version}-%{release}
207
208 %description apidocs
209 API documentation for the LLVM compiler infrastructure.
210
211 %description apidocs -l pl.UTF-8
212 Dokumentacja API infrastruktury kompilatorów LLVM.
213
214 %package polly
215 Summary:        Polyhedral optimizations for LLVM
216 Summary(pl.UTF-8):      Optymalizacje wielościanowe dla LLVM-a
217 Group:          Development/Tools
218 URL:            http://polly.llvm.org/
219 Requires:       %{name} = %{version}-%{release}
220
221 %description polly
222 Polly is a high-level loop and data-locality optimizer and
223 optimization infrastructure for LLVM. It uses an abstract mathematical
224 representation based on integer polyhedra to analyze and optimize the
225 memory access pattern of a program.
226
227 %description polly -l pl.UTF-8
228 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
229 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
230 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
231 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
232
233 %package polly-devel
234 Summary:        Header files for LLVM Polly optimization infrastructure
235 Summary(pl.UTF-8):      Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
236 Group:          Development/Libraries
237 URL:            http://polly.llvm.org/
238 Requires:       %{name}-devel = %{version}-%{release}
239 Requires:       %{name}-polly = %{version}-%{release}
240
241 %description polly-devel
242 Header files for LLVM Polly optimization infrastructure.
243
244 %description polly-devel -l pl.UTF-8
245 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
246
247 %package -n clang
248 Summary:        A C language family frontend for LLVM
249 Summary(pl.UTF-8):      Frontend LLVM-a do języków z rodziny C
250 License:        NCSA
251 Group:          Development/Languages
252 Requires:       %{name} = %{version}-%{release}
253 Requires:       clang-libs = %{version}-%{release}
254
255 %description -n clang
256 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
257 of a crane or goose. 3. C-language family front-end toolkit.
258
259 The goal of the Clang project is to create a new C, C++, Objective C
260 and Objective C++ front-end for the LLVM compiler. Its tools are built
261 as libraries and designed to be loosely-coupled and extendable.
262
263 %description -n clang -l pl.UTF-8
264 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
265 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
266 z rodziny C.
267
268 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
269 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
270 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
271 i rozszerzaniu.
272
273 %package -n clang-libs
274 Summary:        Clang shared libraries
275 Summary(pl.UTF-8):      Biblioteki współdzielone Clanga
276 Group:          Libraries
277
278 %description -n clang-libs
279 Clang shared libraries.
280
281 %description -n clang-libs -l pl.UTF-8
282 Biblioteki współdzielone Clanga.
283
284 %package -n clang-multilib
285 Summary:        A C language family frontend for LLVM - 32-bit support
286 Summary(pl.UTF-8):      Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
287 License:        NCSA
288 Group:          Development/Languages
289 Requires:       clang = %{version}-%{release}
290
291 %description -n clang-multilib
292 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
293 of a crane or goose. 3. C-language family front-end toolkit.
294
295 The goal of the Clang project is to create a new C, C++, Objective C
296 and Objective C++ front-end for the LLVM compiler. Its tools are built
297 as libraries and designed to be loosely-coupled and extendable.
298
299 This package contains the C compiler support for producing 32-bit
300 programs on 64-bit host.
301
302 %description -n clang-multilib -l pl.UTF-8
303 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
304 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
305 z rodziny C.
306
307 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
308 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
309 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
310 i rozszerzaniu.
311
312 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
313 programów 32-bitowych na maszynie 64-bitowej.
314
315 %package -n clang-analyzer
316 Summary:        A source code analysis framework
317 Summary(pl.UTF-8):      Szkielet do analizy kodu źródłowego
318 License:        NCSA
319 Group:          Development/Languages
320 Requires:       clang = %{version}-%{release}
321 # not picked up automatically since files are currently not instaled
322 # in standard Python hierarchies yet
323 Requires:       python
324
325 %description -n clang-analyzer
326 The Clang Static Analyzer consists of both a source code analysis
327 framework and a standalone tool that finds bugs in C and Objective-C
328 programs. The standalone tool is invoked from the command-line, and is
329 intended to run in tandem with a build of a project or code base.
330
331 %description -n clang-analyzer -l pl.UTF-8
332 Clang Static Analyzer składa się ze szkieletu do analizy kodu
333 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
334 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
335 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
336
337 %package -n clang-devel
338 Summary:        Header files for Clang
339 Summary(pl.UTF-8):      Pliki nagłówkowe Clanga
340 Group:          Development/Languages
341 Requires:       %{name}-devel = %{version}-%{release}
342 Requires:       clang = %{version}-%{release}
343
344 %description -n clang-devel
345 This package contains header files for the Clang compiler.
346
347 %description -n clang-devel -l pl.UTF-8
348 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
349
350 %package -n clang-doc
351 Summary:        Documentation for Clang
352 Summary(pl.UTF-8):      Dokumentacja do Clanga
353 Group:          Documentation
354 Requires:       %{name} = %{version}-%{release}
355
356 %description -n clang-doc
357 Documentation for the Clang compiler front-end.
358
359 %description -n clang-doc -l pl.UTF-8
360 Dokumentacja do frontendu kompilatora Clang.
361
362 %package -n clang-apidocs
363 Summary:        API documentation for Clang
364 Summary(pl.UTF-8):      Dokumentacja API Clanga
365 Group:          Development/Languages
366 Requires:       clang-doc = %{version}-%{release}
367
368 %description -n clang-apidocs
369 API documentation for the Clang compiler.
370
371 %description -n clang-apidocs -l pl.UTF-8
372 Dokumentacja API kompilatora Clang.
373
374 %package -n clang-tools-extra
375 Summary:        Extra tools for Clang
376 Summary(pl.UTF-8):      Dodatkowe narzędzia do kompilatora Clang
377 Group:          Development/Tools
378 URL:            http://clang.llvm.org/docs/ClangTools.html
379 Requires:       clang = %{version}-%{release}
380
381 %description -n clang-tools-extra
382 Extra tools for Clang.
383
384 %description -n clang-tools-extra -l pl.UTF-8
385 Dodatkowe narzędzia do kompilatora Clang.
386
387 %package -n lld
388 Summary:        The LLVM linker
389 Summary(pl.UTF-8):      Konsolidator z projektu LLVM
390 Group:          Development/Libraries
391 URL:            http://lld.llvm.org/
392 Requires:       %{name} = %{version}-%{release}
393
394 %description -n lld
395 lld is a new set of modular code for creating linker tools.
396
397 %description -n lld -l pl.UTF-8
398 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
399 konsolidujących.
400
401 %package -n lld-devel
402 Summary:        Development files for LLD linker tools
403 Summary(pl.UTF-8):      Pliki programistyczne narzędzi konsolidujących LLD
404 Group:          Development/Tools
405 URL:            http://lld.llvm.org/
406 Requires:       %{name}-devel = %{version}-%{release}
407
408 %description -n lld-devel
409 Development files for LLD linker tools.
410
411 %description -n lld-devel -l pl.UTF-8
412 Pliki programistyczne narzędzi konsolidujących LLD.
413
414 %package -n lldb
415 Summary:        Next generation high-performance debugger
416 Summary(pl.UTF-8):      Wydajny debugger nowej generacji
417 Group:          Development/Debuggers
418 URL:            http://lldb.llvm.org/
419 Requires:       %{name} = %{version}-%{release}
420 Requires:       python-six
421
422 %description -n lldb
423 LLDB is a next generation, high-performance debugger. It is built as a
424 set of reusable components which highly leverage existing libraries in
425 the larger LLVM Project, such as the Clang expression parser and LLVM
426 disassembler.
427
428 %description -n lldb -l pl.UTF-8
429 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
430 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
431 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
432 disasembler LLVM.
433
434 %package -n lldb-devel
435 Summary:        Development files for LLDB debugger
436 Summary(pl.UTF-8):      Pliki programistyczne debuggera LLDB
437 Group:          Development/Libraries
438 URL:            http://lldb.llvm.org/
439 Requires:       %{name}-devel = %{version}-%{release}
440 Requires:       clang-devel = %{version}-%{release}
441 Requires:       lldb = %{version}-%{release}
442
443 %description -n lldb-devel
444 Development files for LLDB debugger.
445
446 %description -n lldb-devel -l pl.UTF-8
447 Pliki programistyczne debuggera LLDB.
448
449 %package ocaml
450 Summary:        OCaml binding for LLVM
451 Summary(pl.UTF-8):      Wiązanie OCamla do LLVM-a
452 Group:          Libraries
453 Requires:       %{name} = %{version}-%{release}
454 %if %{with ocaml}
455 %requires_eq    ocaml-runtime
456 %endif
457
458 %description ocaml
459 OCaml binding for LLVM.
460
461 %description ocaml -l pl.UTF-8
462 Wiązanie OCamla do LLVM-a.
463
464 %package ocaml-devel
465 Summary:        Development files for LLVM OCaml binding
466 Summary(pl.UTF-8):      Pliki programistyczne wiązania OCamla do LLVM-a
467 Group:          Development/Libraries
468 Requires:       %{name}-devel = %{version}-%{release}
469 Requires:       %{name}-ocaml = %{version}-%{release}
470
471 %description ocaml-devel
472 The llvm-ocaml-devel package contains libraries and signature files
473 for developing applications that use llvm-ocaml binding.
474
475 %description ocaml-devel -l pl.UTF-8
476 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
477 wykorzystujących wiązanie llvm-ocaml.
478
479 %package ocaml-doc
480 Summary:        Documentation for LLVM's OCaml binding
481 Summary(pl.UTF-8):      Dokumentacja wiązania OCamla do LLVM-a
482 Group:          Documentation
483 Requires:       %{name}-ocaml = %{version}-%{release}
484
485 %description ocaml-doc
486 HTML documentation for LLVM's OCaml binding.
487
488 %description ocaml-doc -l pl.UTF-8
489 Dokumentacja HTML wiązania OCamla do LLVM-a.
490
491 %prep
492 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
493 %{__mv} cfe-%{version}.src tools/clang
494 %{?with_rt:mv compiler-rt-%{version}.src projects/compiler-rt}
495 %{?with_lldb:mv lldb-%{version}.src tools/lldb}
496 %{?with_polly:mv polly-%{version}.src tools/polly}
497 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
498 %{__mv} lld-%{version}.src tools/lld
499
500 %patch0 -p1
501 %patch1 -p1
502 %patch2 -p1
503 %patch3 -p1
504 %patch4 -p1
505 %patch5 -p1
506
507 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
508         s,^#!.*bin/env python,#!%{__python},
509         s,^#!.*bin/env perl,#!%{__perl},
510 }'
511
512 %build
513 install -d build
514
515 # Disabling assertions now, rec. by pure and needed for OpenGTL
516 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
517 cd build
518 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
519
520 %cmake \
521 %ifarch %{x8664}
522         -DLLVM_LIBDIR_SUFFIX:STRING=64 \
523 %endif
524 %ifarch x32
525         -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
526 %endif
527 %if %{with apidocs}
528         -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
529 %endif
530 %if %{with doc}
531         -DLLVM_ENABLE_SPHINX:BOOL=ON \
532         -DSPHINX_WARNINGS_AS_ERRORS=OFF \
533 %endif
534         -DLLVM_ENABLE_PIC:BOOL=ON \
535         -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
536         -DLLVM_ENABLE_CXX1Y:BOOL=ON \
537         -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
538         -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
539         -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
540         -DBUILD_SHARED_LIBS:BOOL=OFF \
541         -DENABLE_LINKER_BUILD_ID:BOOL=ON \
542         ../
543
544 %{__make} \
545         VERBOSE=1 \
546         REQUIRES_RTTI=1 \
547         OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
548
549 %if %{with tests}
550 %{__make} check 2>&1 | tee llvm-testlog.txt
551 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
552 %endif
553
554 %if %{with doc}
555 %{__make} -C docs docs-llvm-html
556 %{__make} -C docs docs-llvm-man
557 %if %{with ocaml}
558 %{__make} -C docs ocaml_doc
559 %endif
560 %{__make} -C tools/clang/docs docs-clang-html
561 %{__make} -C tools/clang/docs docs-clang-man
562 %{__make} -C tools/lld/docs docs-lld-html
563 %{__make} -C tools/lldb/docs lldb-python-doc
564 %{__make} -C tools/lldb/docs lldb-cpp-doc
565 %endif
566
567 %install
568 rm -rf $RPM_BUILD_ROOT
569 %{__make} -C build install \
570         DESTDIR=$RPM_BUILD_ROOT
571
572 # only some .pyc files are created by make install
573 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
574 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
575
576 # Adjust static analyzer installation
577 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
578 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
579 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
580 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
581 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
582 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
583 %py_postclean %{_datadir}/scan-view
584
585 # not installed by cmake buildsystem
586 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
587
588 %if %{with doc}
589 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
590 # these tools are not installed
591 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
592 # make links
593 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
594 %endif
595
596 # Move documentation back to build directory
597 %if %{with ocaml}
598 rm -rf ocamldocs
599 %{__mv} $RPM_BUILD_ROOT%{_prefix}/docs/ocaml/html/html ocamldocs
600 %endif
601
602 # and separate the apidoc
603 %if %{with apidocs}
604 rm -rf clang-apidoc
605 cp -a build/tools/clang/docs/html clang-apidoc
606 %endif
607
608 # And prepare Clang documentation
609 rm -rf clang-docs
610 install -d clang-docs
611 for f in LICENSE.TXT NOTES.txt README.txt; do
612         ln tools/clang/$f clang-docs
613 done
614
615 # Get rid of erroneously installed example files.
616 %{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
617 # test?
618 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
619 # not this OS
620 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
621 # use system six
622 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
623 # it seems it is used internally by an extra clang tool
624 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
625
626 %clean
627 rm -rf $RPM_BUILD_ROOT
628
629 %post   libs -p /sbin/ldconfig
630 %postun libs -p /sbin/ldconfig
631
632 %post   -n clang -p /sbin/ldconfig
633 %postun -n clang -p /sbin/ldconfig
634
635 %post   -n lldb -p /sbin/ldconfig
636 %postun -n lldb -p /sbin/ldconfig
637
638 %files
639 %defattr(644,root,root,755)
640 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
641 %attr(755,root,root) %{_bindir}/bugpoint
642 %attr(755,root,root) %{_bindir}/llc
643 %attr(755,root,root) %{_bindir}/lli
644 %attr(755,root,root) %{_bindir}/llvm-ar
645 %attr(755,root,root) %{_bindir}/llvm-as
646 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
647 %attr(755,root,root) %{_bindir}/llvm-cov
648 %attr(755,root,root) %{_bindir}/llvm-diff
649 %attr(755,root,root) %{_bindir}/llvm-dis
650 %attr(755,root,root) %{_bindir}/llvm-dsymutil
651 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
652 %attr(755,root,root) %{_bindir}/llvm-dwp
653 %attr(755,root,root) %{_bindir}/llvm-extract
654 %attr(755,root,root) %{_bindir}/llvm-lib
655 %attr(755,root,root) %{_bindir}/llvm-link
656 %attr(755,root,root) %{_bindir}/llvm-lto
657 %attr(755,root,root) %{_bindir}/llvm-mc
658 %attr(755,root,root) %{_bindir}/llvm-mcmarkup
659 %attr(755,root,root) %{_bindir}/llvm-nm
660 %attr(755,root,root) %{_bindir}/llvm-objdump
661 %attr(755,root,root) %{_bindir}/llvm-profdata
662 %attr(755,root,root) %{_bindir}/llvm-ranlib
663 %attr(755,root,root) %{_bindir}/llvm-readobj
664 %attr(755,root,root) %{_bindir}/llvm-rtdyld
665 %attr(755,root,root) %{_bindir}/llvm-size
666 %attr(755,root,root) %{_bindir}/llvm-split
667 %attr(755,root,root) %{_bindir}/llvm-stress
668 %attr(755,root,root) %{_bindir}/llvm-symbolizer
669 %attr(755,root,root) %{_bindir}/llvm-tblgen
670 %attr(755,root,root) %{_bindir}/llvm-cxxdump
671 %attr(755,root,root) %{_bindir}/llvm-pdbdump
672 %attr(755,root,root) %{_bindir}/obj2yaml
673 %attr(755,root,root) %{_bindir}/opt
674 %attr(755,root,root) %{_bindir}/sancov
675 %attr(755,root,root) %{_bindir}/sanstats
676 %attr(755,root,root) %{_bindir}/verify-uselistorder
677 %attr(755,root,root) %{_bindir}/yaml2obj
678 %if %{with doc}
679 %{_mandir}/man1/bugpoint.1*
680 %{_mandir}/man1/lit.1*
681 %{_mandir}/man1/llc.1*
682 %{_mandir}/man1/lli.1*
683 %{_mandir}/man1/llvm-ar.1*
684 %{_mandir}/man1/llvm-as.1*
685 %{_mandir}/man1/llvm-bcanalyzer.1*
686 %{_mandir}/man1/llvm-cov.1*
687 %{_mandir}/man1/llvm-diff.1*
688 %{_mandir}/man1/llvm-dis.1*
689 %{_mandir}/man1/llvm-dwarfdump.1*
690 %{_mandir}/man1/llvm-extract.1*
691 %{_mandir}/man1/llvm-lib.1*
692 %{_mandir}/man1/llvm-link.1*
693 %{_mandir}/man1/llvm-nm.1*
694 %{_mandir}/man1/llvm-profdata.1*
695 %{_mandir}/man1/llvm-ranlib.1*
696 %{_mandir}/man1/llvm-readobj.1*
697 %{_mandir}/man1/llvm-stress.1*
698 %{_mandir}/man1/llvm-symbolizer.1*
699 %{_mandir}/man1/opt.1*
700 %{_mandir}/man1/tblgen.1*
701 %endif
702
703 %files libs
704 %defattr(644,root,root,755)
705 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
706 # non-soname symlink
707 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
708 %attr(755,root,root) %{_libdir}/libLTO.so
709
710 %files devel
711 %defattr(644,root,root,755)
712 %attr(755,root,root) %{_bindir}/llvm-config
713 %attr(755,root,root) %{_libdir}/libLLVM.so
714 %attr(755,root,root) %{_libdir}/BugpointPasses.so
715 %{_libdir}/libLLVM*.a
716 %{_includedir}/llvm
717 %{_includedir}/llvm-c
718 %{_libdir}/cmake/llvm
719 %if %{with doc}
720 %{_mandir}/man1/llvm-config.1*
721 %endif
722
723 #%files doc
724 #%defattr(644,root,root,755)
725
726 %if %{with apidocs}
727 %files apidocs
728 %defattr(644,root,root,755)
729 %doc apidoc/*
730 %endif
731
732 %if %{with polly}
733 %files polly
734 %defattr(644,root,root,755)
735 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
736 %attr(755,root,root) %{_libdir}/LLVMPolly.so
737
738 %files polly-devel
739 %defattr(644,root,root,755)
740 %{_libdir}/libPolly.a
741 %{_libdir}/libPollyISL.a
742 %{_libdir}/libPollyPPCG.a
743 %{_includedir}/polly
744 %endif
745
746 %files -n clang
747 %defattr(644,root,root,755)
748 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
749 %attr(755,root,root) %{_bindir}/clang
750 %attr(755,root,root) %{_bindir}/clang++
751 %attr(755,root,root) %{_bindir}/clang-%{abi}
752 %attr(755,root,root) %{_bindir}/clang-check
753 %attr(755,root,root) %{_bindir}/clang-cl
754 %attr(755,root,root) %{_bindir}/clang-format
755 %attr(755,root,root) %{_bindir}/git-clang-format
756 %dir %{_libdir}/clang
757 %dir %{_libdir}/clang/%{version}
758 %{_libdir}/clang/%{version}/include
759 %if %{with rt}
760 %ifarch %{ix86} %{x8664} x32
761 %dir %{_libdir}/clang/%{version}/lib
762 %dir %{_libdir}/clang/%{version}/lib/linux
763 %endif
764 %ifarch %{ix86}
765 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
766 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
767 %endif
768 %ifarch %{x8664}
769 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
770 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
771 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
772 %endif
773 %ifarch %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 ppc64
774 %{_libdir}/clang/%{version}/asan_blacklist.txt
775 %endif
776 %ifarch %{ix86} %{x8664} x32 mips64
777 %{_libdir}/clang/%{version}/cfi_blacklist.txt
778 %endif
779 %ifarch %{x8664} x32 aarch64 mips64
780 %{_libdir}/clang/%{version}/dfsan_abilist.txt
781 %{_libdir}/clang/%{version}/msan_blacklist.txt
782 %endif
783 %endif
784 %dir %{_datadir}/clang
785 %{_datadir}/clang/clang-format-diff.py
786
787 %files -n clang-libs
788 %defattr(644,root,root,755)
789 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
790
791 %if %{with rt} && %{with multilib}
792 %ifarch %{x8664} x32
793 %files -n clang-multilib
794 %defattr(644,root,root,755)
795 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
796 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
797 %endif
798 %ifarch x32
799 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
800 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
801 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
802 %endif
803 %endif
804
805 %files -n clang-analyzer
806 %defattr(644,root,root,755)
807 %attr(755,root,root) %{_bindir}/scan-build
808 %attr(755,root,root) %{_bindir}/scan-view
809 %{_datadir}/scan-build
810 %{_datadir}/scan-view
811 %{_mandir}/man1/scan-build.1*
812 %dir %{_libdir}/scan-build
813 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
814 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
815
816 %files -n clang-devel
817 %defattr(644,root,root,755)
818 %attr(755,root,root) %{_libdir}/libclang.so
819 %{_libdir}/libclang*.a
820 %{_includedir}/clang
821 %{_includedir}/clang-c
822 %{_libdir}/cmake/clang
823
824 %files -n clang-doc
825 %defattr(644,root,root,755)
826 %doc tools/clang/docs/*.{html,png,txt}
827
828 %if %{with apidocs}
829 %files -n clang-apidocs
830 %defattr(644,root,root,755)
831 %doc clang-apidoc/*
832 %endif
833
834 %files -n clang-tools-extra
835 %defattr(644,root,root,755)
836 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
837 %attr(755,root,root) %{_bindir}/clang-apply-replacements
838 %attr(755,root,root) %{_bindir}/clang-include-fixer
839 %attr(755,root,root) %{_bindir}/clang-query
840 %attr(755,root,root) %{_bindir}/clang-rename
841 %attr(755,root,root) %{_bindir}/clang-tidy
842 %attr(755,root,root) %{_bindir}/find-all-symbols
843 %attr(755,root,root) %{_bindir}/modularize
844 %attr(755,root,root) %{_bindir}/pp-trace
845 %{_datadir}/clang/clang-include-fixer.py
846 %{_datadir}/clang/clang-tidy-diff.py
847 %{_datadir}/clang/run-clang-tidy.py
848 %{_datadir}/clang/run-find-all-symbols.py
849
850 %files -n lld
851 %defattr(644,root,root,755)
852 %doc tools/lld/{LICENSE.TXT,README.md}
853 %attr(755,root,root) %{_bindir}/ld.lld
854 %attr(755,root,root) %{_bindir}/lld
855 %attr(755,root,root) %{_bindir}/lld-link
856
857 %files -n lld-devel
858 %defattr(644,root,root,755)
859 %{_libdir}/liblld[ACDEHMRXY]*.a
860 %{_includedir}/lld
861
862 %if %{with lldb}
863 %files -n lldb
864 %defattr(644,root,root,755)
865 %attr(755,root,root) %{_bindir}/lldb
866 %attr(755,root,root) %{_bindir}/lldb-%{version}
867 %attr(755,root,root) %{_bindir}/lldb-argdumper
868 %attr(755,root,root) %{_bindir}/lldb-mi
869 %attr(755,root,root) %{_bindir}/lldb-mi-%{version}
870 %attr(755,root,root) %{_bindir}/lldb-server
871 %attr(755,root,root) %{_bindir}/lldb-server-%{version}
872 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
873 %dir %{py_sitedir}/lldb
874 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
875 %{py_sitedir}/lldb/formatters
876 %{py_sitedir}/lldb/runtime
877 %{py_sitedir}/lldb/utils
878 %{py_sitedir}/lldb/__init__.py[co]
879 %{py_sitedir}/lldb/embedded_interpreter.py[co]
880 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
881 %attr(755,root,root) %{py_sitedir}/readline.so
882
883 %files -n lldb-devel
884 %defattr(644,root,root,755)
885 %attr(755,root,root) %{_libdir}/liblldb.so
886 %{_libdir}/liblldb*.a
887 %{_includedir}/lldb
888 %endif
889
890 %if %{with ocaml}
891 %files ocaml
892 %defattr(644,root,root,755)
893 %{_libdir}/ocaml/META.llvm*
894 %attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
895 %{_libdir}/ocaml/llvm*.cma
896 %{_libdir}/ocaml/llvm*.cmi
897
898 %files ocaml-devel
899 %defattr(644,root,root,755)
900 %{_libdir}/ocaml/libllvm*.a
901 %{_libdir}/ocaml/llvm*.a
902 %{_libdir}/ocaml/llvm*.cmx*
903
904 %files ocaml-doc
905 %defattr(644,root,root,755)
906 %doc ocamldocs/*
907 %endif
This page took 0.162977 seconds and 4 git commands to generate.