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