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