2 #warning: Installed (but unpackaged) file(s) found:
3 # /usr/share/man/man1/lit.1.gz
6 %bcond_without ocaml # ocaml binding
7 %bcond_with apidocs # The doxygen docs are HUGE, so they are not built by default.
8 %bcond_with tests # run tests
10 %ifarch s390 s390x sparc64
11 # No ocaml on these arches
15 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
16 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
20 License: University of Illinois/NCSA Open Source License
21 Group: Development/Languages
22 Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.tgz
23 # Source0-md5: 220d361b4d17051ff4bb21c64abe05ba
24 Source1: http://llvm.org/releases/%{version}/clang-%{version}.tgz
25 # Source1-md5: 10e14c901fc3728eecbd5b829e011b59
26 # Data files should be installed with timestamps preserved
27 Patch3: %{name}-2.6-timestamp.patch
33 BuildRequires: doxygen
34 BuildRequires: graphviz
37 BuildRequires: dejagnu
39 BuildRequires: tcl-devel
42 BuildRequires: libltdl-devel
43 BuildRequires: libstdc++-devel >= 5:3.4
44 BuildRequires: ocaml-ocamldoc
45 # gcc4 might be installed, but not current __cc
46 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
47 BuildRequires: __cc >= 3.4
49 # LLVM is not supported on PPC64
50 # http://llvm.org/bugs/show_bug.cgi?id=3729
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _sysconfdir /etc/%{name}
56 %define specflags_ppc -fno-var-tracking-assignments
58 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
59 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
62 LLVM is a compiler infrastructure designed for compile-time,
63 link-time, runtime, and idle-time optimization of programs from
64 arbitrary programming languages. LLVM is written in C++ and has been
65 developed since 2000 at the University of Illinois and Apple. It
66 currently supports compilation of C and C++ programs, using front-ends
67 derived from GCC 4.0.1. A new front-end for the C family of languages
68 is in development. The compiler infrastructure includes mirror sets of
69 programming tools as well as libraries with equivalent functionality.
71 %description -l pl.UTF-8
72 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
73 czasu kompilowania, linkowania, działania i bezczynności programów w
74 dowolnych językach programowania. Jest napisana w C++, rozwijana od
75 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
76 kompilację programów w C i C++ przy użyciu frontendów wywodzących się
77 z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
78 rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
79 narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
83 Summary: Libraries and header files for LLVM
84 Group: Development/Languages
85 Requires: %{name} = %{version}-%{release}
86 Requires: libstdc++-devel >= 6:3.4
89 This package contains library and header files needed to develop new
90 native programs that use the LLVM infrastructure.
93 Summary: Documentation for LLVM
95 # does not require base
98 Documentation for the LLVM compiler infrastructure.
101 Summary: API documentation for LLVM
102 Group: Development/Languages
103 Requires: %{name}-doc = %{version}-%{release}
106 API documentation for the LLVM compiler infrastructure.
109 Summary: A C language family frontend for LLVM
111 Group: Development/Languages
113 %description -n clang
114 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
115 of a crane or goose. 3. C-language family front-end toolkit.
117 The goal of the Clang project is to create a new C, C++, Objective C
118 and Objective C++ front-end for the LLVM compiler. Its tools are built
119 as libraries and designed to be loosely-coupled and extendable.
121 %package -n clang-analyzer
122 Summary: A source code analysis framework
124 Group: Development/Languages
125 Requires: clang = %{version}-%{release}
126 # not picked up automatically since files are currently not instaled
127 # in standard Python hierarchies yet
130 %description -n clang-analyzer
131 The Clang Static Analyzer consists of both a source code analysis
132 framework and a standalone tool that finds bugs in C and Objective-C
133 programs. The standalone tool is invoked from the command-line, and is
134 intended to run in tandem with a build of a project or code base.
136 %package -n clang-devel
137 Summary: Header files for clang
138 Group: Development/Languages
139 Requires: clang = %{version}-%{release}
141 %description -n clang-devel
142 This package contains header files for the Clang compiler.
144 %package -n clang-doc
145 Summary: Documentation for Clang
147 Requires: %{name} = %{version}-%{release}
149 %description -n clang-doc
150 Documentation for the Clang compiler front-end.
152 %package -n clang-apidocs
153 Summary: API documentation for Clang
154 Group: Development/Languages
155 Requires: clang-doc = %{version}-%{release}
157 %description -n clang-apidocs
158 API documentation for the Clang compiler.
161 Summary: OCaml binding for LLVM
162 Group: Development/Libraries
163 Requires: %{name} = %{version}-%{release}
164 %requires_eq ocaml-runtime
167 OCaml binding for LLVM.
170 Summary: Development files for %{name}-ocaml
171 Group: Development/Libraries
172 Requires: %{name}-devel = %{version}-%{release}
173 Requires: %{name}-ocaml = %{version}-%{release}
175 %description ocaml-devel
176 The llvm-ocaml-devel package contains libraries and signature files
177 for developing applications that use llvm-ocaml.
180 Summary: Documentation for LLVM's OCaml binding
182 Requires: %{name}-ocaml = %{version}-%{release}
184 %description ocaml-doc
185 HTML documentation for LLVM's OCaml binding.
189 mv clang-*.* tools/clang
195 # Disabling assertions now, rec. by pure and needed for OpenGTL
196 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
198 # bash specific 'test a < b'
201 --libdir=%{_libdir}/%{name} \
202 --datadir=%{_datadir}/%{name}-%{version} \
210 --disable-assertions \
211 --enable-debug-runtime \
218 # configure does not properly specify libdir
219 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
222 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
225 %{__make} check 2>&1 | tee llvm-testlog.txt
226 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
230 rm -rf $RPM_BUILD_ROOT
231 %{__make} -C obj -j1 install \
232 PROJ_docsdir=/moredocs \
233 DESTDIR=$RPM_BUILD_ROOT
235 # Static analyzer not installed by default:
236 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
237 install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
239 for f in scan-{build,view}; do
240 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
241 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
244 # Move documentation back to build directory
246 mv $RPM_BUILD_ROOT/moredocs .
247 rm -fv moredocs/*.tar.gz
248 rm -fv moredocs/ocamldoc/html/*.tar.gz
250 # and separate the apidoc
252 rm -rf apidoc clang-apidoc
253 mv moredocs/html/doxygen apidoc
254 cp -a tools/clang/docs/doxygen/html clang-apidoc
257 # And prepare Clang documentation
259 install -d clang-docs
260 for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
261 ln tools/clang/$f clang-docs
264 # Get rid of erroneously installed example files.
265 rm -v $RPM_BUILD_ROOT%{_libdir}/%{name}/*LLVMHello.*
267 # FIXME file this bug
268 sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
269 $RPM_BUILD_ROOT%{_bindir}/llvm-config
271 # remove documentation makefiles:
272 # they require the build directory to work
273 rm -rf moredocs/examples
274 cp -a examples moredocs/examples
275 find moredocs/examples -name Makefile | xargs -0r rm -f
278 rm -rf $RPM_BUILD_ROOT
280 %post -p /sbin/ldconfig
281 %postun -p /sbin/ldconfig
284 %defattr(644,root,root,755)
285 %doc CREDITS.TXT LICENSE.TXT README.txt
286 %{?with_tests:%doc llvm-testlog.txt}
287 %attr(755,root,root) %{_bindir}/bugpoint
288 %attr(755,root,root) %{_bindir}/llc
289 %attr(755,root,root) %{_bindir}/lli
290 %attr(755,root,root) %{_bindir}/opt
291 %attr(755,root,root) %{_bindir}/llvmc
292 %attr(755,root,root) %{_bindir}/llvm-*
293 %exclude %attr(755,root,root) %{_bindir}/llvm-config
294 %{_mandir}/man1/bugpoint.1*
295 %{_mandir}/man1/llc.1*
296 %{_mandir}/man1/lli.1*
297 %{_mandir}/man1/llvmc.1*
298 %{_mandir}/man1/llvm-*.1*
299 %{_mandir}/man1/llvmgcc.1*
300 %{_mandir}/man1/llvmgxx.1*
301 %{_mandir}/man1/opt.1*
302 #%{_mandir}/man1/stkrc.1*
303 %{_mandir}/man1/tblgen.1*
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_bindir}/llvm-config
309 %{_includedir}/llvm-c
313 %defattr(644,root,root,755)
314 %doc moredocs/examples moredocs/html
318 %defattr(644,root,root,755)
323 %defattr(644,root,root,755)
325 %{?with_tests:%doc clang-testlog.txt}
326 %attr(755,root,root) %{_bindir}/clang*
327 %attr(755,root,root) %{_bindir}/tblgen
328 %attr(755,root,root) %{_bindir}/c-index-test
330 %{_mandir}/man1/clang.1.*
332 %files -n clang-analyzer
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_bindir}/scan-build
335 %attr(755,root,root) %{_bindir}/scan-view
336 %dir %{_libdir}/clang-analyzer
338 %dir %{_libdir}/clang-analyzer/scan-view
339 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
340 %{_libdir}/clang-analyzer/scan-view/Resources
341 %{_libdir}/clang-analyzer/scan-view/*.py
343 %dir %{_libdir}/clang-analyzer/scan-build
344 %{_libdir}/clang-analyzer/scan-build/*.css
345 %{_libdir}/clang-analyzer/scan-build/*.js
346 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
347 %attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
349 %files -n clang-devel
350 %defattr(644,root,root,755)
352 %{_includedir}/clang-c
355 %defattr(644,root,root,755)
356 %doc tools/clang/docs/*
359 %files -n clang-apidocs
360 %defattr(644,root,root,755)
366 %defattr(644,root,root,755)
367 %{_libdir}/ocaml/*.cma
368 %{_libdir}/ocaml/*.cmi
371 %defattr(644,root,root,755)
373 %{_libdir}/ocaml/*.cmx*
374 %{_libdir}/ocaml/*.mli
377 %defattr(644,root,root,755)
378 %doc moredocs/ocamldoc/html/*