]> git.pld-linux.org Git - packages/llvm.git/blob - llvm.spec
- started update to 3.7.0
[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.7.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:  b98b9495e5655a672d6cb83e1a180f8e
26 Source1:        http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
27 # Source1-md5:  8f9d27335e7331cf0a4711e952f21f01
28 Source2:        http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
29 # Source2-md5:  383c10affd513026f08936b5525523f5
30 Source3:        http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
31 # Source3-md5:  e5931740400d1dc3e7db4c7ba2ceff68
32 Source4:        http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz
33 # Source4-md5:  32f93ffc9cc7e042df22089761558f8b
34 Source5:        http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
35 # Source5-md5:  d5a87dacb65d981a427a536f6964642e
36 Source6:        http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz
37 # Source6-md5:  91bd593a67293d84dad0bf11845546c2
38 # Data files should be installed with timestamps preserved
39 Patch1:         %{name}-2.6-timestamp.patch
40 Patch2:         %{name}-pld.patch
41 Patch3:         build-lld.patch
42 Patch4:         %{name}-lldb.patch
43 Patch5:         %{name}-lldb-atomic.patch
44 Patch6:         libdir.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 build
463 #%if "%{_lib}" != "lib"
464 ## workaround for clang relative search paths building
465 #install -d build/Release
466 #ln -snf lib build/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 build
488 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
489
490 %{cmake} ../ \
491 %ifarch %{x8664}
492         -DLLVM_LIBDIR_SUFFIX:STRING=64 \
493 %endif
494 %ifarch x32
495         -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
496 %endif
497 %ifarch %{ix86}
498         -DLLVM_ENABLE_PIC:BOOL=OFF \
499 %endif
500 %if %{with apidocs}
501         -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
502 %endif
503 %if %{with doc}
504         -DLLVM_ENABLE_SPHINX:BOOL=ON \
505 %endif
506         -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
507         -DLLVM_ENABLE_CXX1Y:BOOL=ON \
508         -DLLVM_BINDINGS_LIST:LIST="go%{?with_ocaml:;ocaml};python" \
509         -DBUILD_SHARED_LIBS:BOOL=ON
510
511 #bash ../%%configure \
512 #       --datadir=%{_datadir}/%{name}-%{version} \
513 #       --enable-jit \
514 #       --enable-optimized
515
516 %{__make} \
517         VERBOSE=1 \
518         REQUIRES_RTTI=1 \
519         OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
520
521 %if %{with tests}
522 %{__make} check 2>&1 | tee llvm-testlog.txt
523 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
524 %endif
525
526 %if %{with doc}
527 %{__make} -C docs docs-llvm-html
528 %{__make} -C docs docs-llvm-man
529 %{__make} -C docs ocaml_doc
530 %{__make} -C tools/clang/docs docs-clang-html
531 %{__make} -C tools/clang/docs docs-clang-man
532 %{__make} -C tools/lld/docs docs-lld-html
533 %{__make} -C tools/lldb/docs lldb-python-doc
534 %{__make} -C tools/lldb/docs lldb-cpp-doc
535 %endif
536
537 %install
538 rm -rf $RPM_BUILD_ROOT
539 %{__make} -C build install \
540         PROJ_docsdir=/moredocs \
541         VERBOSE=1 \
542         DESTDIR=$RPM_BUILD_ROOT
543
544 # Static analyzer not installed by default:
545 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
546 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
547 # create launchers
548 for f in scan-{build,view}; do
549         ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
550         cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
551 done
552 install -d $RPM_BUILD_ROOT%{_mandir}/man1
553 %{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1
554 %py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
555 %py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
556 %py_postclean %{_libdir}/clang-analyzer/scan-view
557 # not this OS
558 %{__rm} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/*.bat
559
560 %if %{with doc}
561 cp -p docs/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
562 # these tools are not installed
563 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
564 # make links
565 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
566 %endif
567
568 # Move documentation back to build directory
569 rm -rf moredocs
570 mv $RPM_BUILD_ROOT/moredocs .
571 %{__rm} -v moredocs/*.tar.gz
572 %if %{with ocaml}
573 %{__rm} -v moredocs/ocamldoc/html/*.tar.gz
574 %endif
575
576 # and separate the apidoc
577 %if %{with apidocs}
578 rm -rf apidoc clang-apidoc
579 mv moredocs/html/doxygen apidoc
580 cp -a tools/clang/docs/doxygen/html clang-apidoc
581 %endif
582
583 # And prepare Clang documentation
584 rm -rf clang-docs
585 install -d clang-docs
586 for f in LICENSE.TXT NOTES.txt README.txt; do
587         ln tools/clang/$f clang-docs
588 done
589
590 # Get rid of erroneously installed example files.
591 %{__rm} -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
592 # parts of test suite
593 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{FileCheck,count,not}
594
595 # remove documentation makefiles:
596 # they require the build directory to work
597 rm -rf moredocs/examples
598 cp -a examples moredocs/examples
599 find moredocs/examples -name Makefile | xargs -0r rm -f
600
601 %clean
602 rm -rf $RPM_BUILD_ROOT
603
604 %post   libs -p /sbin/ldconfig
605 %postun libs -p /sbin/ldconfig
606
607 %post   -n clang -p /sbin/ldconfig
608 %postun -n clang -p /sbin/ldconfig
609
610 %post   -n lldb -p /sbin/ldconfig
611 %postun -n lldb -p /sbin/ldconfig
612
613 %files
614 %defattr(644,root,root,755)
615 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
616 %attr(755,root,root) %{_bindir}/bugpoint
617 %attr(755,root,root) %{_bindir}/llc
618 %attr(755,root,root) %{_bindir}/lli
619 %attr(755,root,root) %{_bindir}/lli-child-target
620 %attr(755,root,root) %{_bindir}/llvm-ar
621 %attr(755,root,root) %{_bindir}/llvm-as
622 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
623 %attr(755,root,root) %{_bindir}/llvm-cov
624 %attr(755,root,root) %{_bindir}/llvm-diff
625 %attr(755,root,root) %{_bindir}/llvm-dis
626 %attr(755,root,root) %{_bindir}/llvm-dsymutil
627 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
628 %attr(755,root,root) %{_bindir}/llvm-extract
629 %attr(755,root,root) %{_bindir}/llvm-link
630 %attr(755,root,root) %{_bindir}/llvm-mc
631 %attr(755,root,root) %{_bindir}/llvm-mcmarkup
632 %attr(755,root,root) %{_bindir}/llvm-nm
633 %attr(755,root,root) %{_bindir}/llvm-objdump
634 %attr(755,root,root) %{_bindir}/llvm-profdata
635 %attr(755,root,root) %{_bindir}/llvm-ranlib
636 %attr(755,root,root) %{_bindir}/llvm-readobj
637 %attr(755,root,root) %{_bindir}/llvm-rtdyld
638 %attr(755,root,root) %{_bindir}/llvm-size
639 %attr(755,root,root) %{_bindir}/llvm-stress
640 %attr(755,root,root) %{_bindir}/llvm-symbolizer
641 %attr(755,root,root) %{_bindir}/llvm-tblgen
642 %attr(755,root,root) %{_bindir}/llvm-cxxdump
643 %attr(755,root,root) %{_bindir}/llvm-pdbdump
644 %attr(755,root,root) %{_bindir}/macho-dump
645 %attr(755,root,root) %{_bindir}/obj2yaml
646 %attr(755,root,root) %{_bindir}/opt
647 %attr(755,root,root) %{_bindir}/verify-uselistorder
648 %attr(755,root,root) %{_bindir}/yaml2obj
649 %if %{with doc}
650 %{_mandir}/man1/bugpoint.1*
651 %{_mandir}/man1/lit.1*
652 %{_mandir}/man1/llc.1*
653 %{_mandir}/man1/lli.1*
654 %{_mandir}/man1/llvm-ar.1*
655 %{_mandir}/man1/llvm-as.1*
656 %{_mandir}/man1/llvm-bcanalyzer.1*
657 %{_mandir}/man1/llvm-cov.1*
658 %{_mandir}/man1/llvm-diff.1*
659 %{_mandir}/man1/llvm-dis.1*
660 %{_mandir}/man1/llvm-dwarfdump.1*
661 %{_mandir}/man1/llvm-extract.1*
662 %{_mandir}/man1/llvm-link.1*
663 %{_mandir}/man1/llvm-nm.1*
664 %{_mandir}/man1/llvm-profdata.1*
665 %{_mandir}/man1/llvm-ranlib.1*
666 %{_mandir}/man1/llvm-readobj.1*
667 %{_mandir}/man1/llvm-stress.1*
668 %{_mandir}/man1/llvm-symbolizer.1*
669 %{_mandir}/man1/opt.1*
670 %{_mandir}/man1/tblgen.1*
671 %endif
672
673 %files libs
674 %defattr(644,root,root,755)
675 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
676 %attr(755,root,root) %{_libdir}/libLLVM-3.7.so
677
678 %files devel
679 %defattr(644,root,root,755)
680 %attr(755,root,root) %{_bindir}/llvm-config
681 %{_libdir}/libLLVM*.a
682 %ifarch %{x8664} x32
683 %attr(755,root,root) %{_libdir}/BugpointPasses.so
684 %attr(755,root,root) %{_libdir}/libLTO.so
685 %{_libdir}/libLTO.a
686 %endif
687 %{_includedir}/llvm
688 %{_includedir}/llvm-c
689 %dir %{_datadir}/llvm
690 %{_datadir}/llvm/cmake
691 %if %{with doc}
692 %{_mandir}/man1/llvm-config.1*
693 %endif
694
695 %files doc
696 %defattr(644,root,root,755)
697 %doc moredocs/examples moredocs/html
698
699 %if %{with apidocs}
700 %files apidocs
701 %defattr(644,root,root,755)
702 %doc apidoc/*
703 %endif
704
705 %if %{with polly}
706 %files polly
707 %defattr(644,root,root,755)
708 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README}
709 %attr(755,root,root) %{_libdir}/LLVMPolly.so
710
711 %files polly-devel
712 %defattr(644,root,root,755)
713 %{_includedir}/polly
714 %endif
715
716 %files -n clang
717 %defattr(644,root,root,755)
718 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
719 %attr(755,root,root) %{_bindir}/c-index-test
720 %attr(755,root,root) %{_bindir}/clang
721 %attr(755,root,root) %{_bindir}/clang++
722 %attr(755,root,root) %{_bindir}/clang-check
723 %attr(755,root,root) %{_bindir}/clang-format
724 %attr(755,root,root) %{_bindir}/clang-tblgen
725 %attr(755,root,root) %{_libdir}/libclang.so
726 %dir %{_libdir}/clang
727 %dir %{_libdir}/clang/%{version}
728 %{_libdir}/clang/%{version}/include
729 %if %{with rt}
730 %{_libdir}/clang/%{version}/lib
731 %endif
732 #%{_mandir}/man1/clang.1*
733
734 %files -n clang-analyzer
735 %defattr(644,root,root,755)
736 %attr(755,root,root) %{_bindir}/scan-build
737 %attr(755,root,root) %{_bindir}/scan-view
738 %{_mandir}/man1/scan-build.1*
739 %dir %{_libdir}/clang-analyzer
740
741 %dir %{_libdir}/clang-analyzer/scan-build
742 %{_libdir}/clang-analyzer/scan-build/*.css
743 %{_libdir}/clang-analyzer/scan-build/*.js
744 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
745 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
746
747 %dir %{_libdir}/clang-analyzer/scan-view
748 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
749 %{_libdir}/clang-analyzer/scan-view/Resources
750 %{_libdir}/clang-analyzer/scan-view/*.py[co]
751
752 %files -n clang-devel
753 %defattr(644,root,root,755)
754 %{_libdir}/libclang*.a
755 %{_includedir}/clang
756 %{_includedir}/clang-c
757
758 %files -n clang-doc
759 %defattr(644,root,root,755)
760 %doc tools/clang/docs/*.{html,png,txt}
761
762 %if %{with apidocs}
763 %files -n clang-apidocs
764 %defattr(644,root,root,755)
765 %doc clang-apidoc/*
766 %endif
767
768 %files -n clang-tools-extra
769 %defattr(644,root,root,755)
770 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt,docs/_build/html/{*.html,*.js,_static}}
771 %attr(755,root,root) %{_bindir}/clang-apply-replacements
772 %attr(755,root,root) %{_bindir}/clang-modernize
773 %attr(755,root,root) %{_bindir}/clang-query
774 %attr(755,root,root) %{_bindir}/clang-rename
775 %attr(755,root,root) %{_bindir}/clang-tidy
776 %attr(755,root,root) %{_bindir}/pp-trace
777 %{_libdir}/libmodernizeCore.a
778
779 %files -n lld
780 %defattr(644,root,root,755)
781 %doc tools/lld/{LICENSE.TXT,README.md}
782 %attr(755,root,root) %{_bindir}/lld
783
784 %files -n lld-devel
785 %defattr(644,root,root,755)
786 %{_libdir}/liblldConfig.a
787 %{_libdir}/liblldCore.a
788 %{_libdir}/liblldDriver.a
789 %{_libdir}/liblldELF.a
790 %{_libdir}/liblldMachO.a
791 %{_libdir}/liblldNative.a
792 %{_libdir}/liblldPECOFF.a
793 %{_libdir}/liblldPasses.a
794 %{_libdir}/liblldReaderWriter.a
795 %{_libdir}/liblldYAML.a
796 %{_libdir}/liblld*ELFTarget.a
797 %{_includedir}/lld
798
799 %if %{with lldb}
800 %files -n lldb
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_bindir}/lldb
803 %attr(755,root,root) %{_bindir}/lldb-server
804 %attr(755,root,root) %{_bindir}/lldb-mi
805 %attr(755,root,root) %{_libdir}/liblldb.so
806 %dir %{py_sitedir}/lldb
807 %attr(755,root,root) %{py_sitedir}/lldb/argdumper
808 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
809 %attr(755,root,root) %{py_sitedir}/readline.so
810
811 %files -n lldb-devel
812 %defattr(644,root,root,755)
813 %{_libdir}/liblldb*.a
814 %{_includedir}/lldb
815 %endif
816
817 %if %{with ocaml}
818 %files ocaml
819 %defattr(644,root,root,755)
820 %{_libdir}/ocaml/META.llvm*
821 %attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
822 %{_libdir}/ocaml/llvm*.cma
823 %{_libdir}/ocaml/llvm*.cmi
824
825 %files ocaml-devel
826 %defattr(644,root,root,755)
827 %{_libdir}/ocaml/libLLVM*.a
828 %{_libdir}/ocaml/libllvm*.a
829 %{_libdir}/ocaml/llvm*.a
830 %{_libdir}/ocaml/llvm*.cmx*
831 %{_libdir}/ocaml/llvm*.mli
832
833 %files ocaml-doc
834 %defattr(644,root,root,755)
835 %doc moredocs/ocamldoc/html/*
836 %endif
This page took 0.127647 seconds and 3 git commands to generate.