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