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