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