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