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