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