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