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