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