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