source: projects/specs/branches/6/l/llvm/llvm-vl.spec @ 1073

Revision 1073, 12.1 KB checked in by daisuke, 14 years ago (diff)

lvm: new package, 2.7-1

Line 
1# Build options:
2#
3# --with doxygen
4#   The doxygen docs are HUGE, so they are not built by default.
5
6Name:           llvm
7Version:        2.7
8Release:        1%{?_dist_release}
9Summary:        The Low Level Virtual Machine
10Summary(ja):    LLVM - 低レベルバーチャルマシン
11
12Group:          Development/Languages
13License:        NCSA
14URL:            http://llvm.org/
15Source0:        http://llvm.org/releases/%{version}/llvm-%{version}.tgz
16Source1:        http://llvm.org/releases/%{version}/clang-%{version}.tgz
17# Data files should be installed with timestamps preserved
18Patch0:         llvm-2.6-timestamp.patch
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22BuildRequires:  bison
23BuildRequires:  chrpath
24BuildRequires:  flex
25BuildRequires:  gcc-c++ >= 3.4
26BuildRequires:  groff
27BuildRequires:  libtool-ltdl-devel
28BuildRequires:  ocaml
29# for DejaGNU test suite
30BuildRequires:  dejagnu tcl python
31%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
32BuildRequires:  doxygen graphviz
33%endif
34
35# LLVM is not supported on PPC64
36# http://llvm.org/bugs/show_bug.cgi?id=3729
37ExcludeArch:    ppc64
38
39%description
40LLVM is a compiler infrastructure designed for compile-time,
41link-time, runtime, and idle-time optimization of programs from
42arbitrary programming languages.  The compiler infrastructure includes
43mirror sets of programming tools as well as libraries with equivalent
44functionality.
45
46
47%package devel
48Summary:        Libraries and header files for LLVM
49Summary(ja):    LLVM のライブラリおよびヘッダファイル
50Group:          Development/Languages
51Requires:       %{name} = %{version}-%{release}
52Requires:       libstdc++-devel
53Provides:       llvm-static = %{version}-%{release}
54
55
56%description devel
57This package contains library and header files needed to develop new
58native programs that use the LLVM infrastructure.
59
60
61%package doc
62Summary:        Documentation for LLVM
63Summary(ja):    LLVM のドキュメント
64Group:          Documentation
65Requires:       %{name} = %{version}-%{release}
66
67%description doc
68Documentation for the LLVM compiler infrastructure.
69
70
71%package -n clang
72Summary:        A C language family front-end for LLVM
73Summary(ja):    LLVM の C 言語用フロントエンド
74License:        NCSA
75Group:          Development/Languages
76
77%description -n clang
78clang: noun
79    1. A loud, resonant, metallic sound.
80    2. The strident call of a crane or goose.
81    3. C-language family front-end toolkit.
82
83The goal of the Clang project is to create a new C, C++, Objective C
84and Objective C++ front-end for the LLVM compiler. Its tools are built
85as libraries and designed to be loosely-coupled and extensible.
86
87
88%package -n clang-devel
89Summary:        Header files for clang
90Summary(ja):    clang のヘッダファイル
91Group:          Development/Languages
92Requires:       clang = %{version}-%{release}
93
94%description -n clang-devel
95This package contains header files for the Clang compiler.
96
97
98%package -n clang-analyzer
99Summary:        A source code analysis framework
100Summary(ja):    ソースコー分析フレームワーク
101License:        NCSA
102Group:          Development/Languages
103Requires:       clang = %{version}-%{release}
104# not picked up automatically since files are currently not instaled
105# in standard Python hierarchies yet
106Requires:       python
107
108%description -n clang-analyzer
109The Clang Static Analyzer consists of both a source code analysis
110framework and a standalone tool that finds bugs in C and Objective-C
111programs. The standalone tool is invoked from the command-line, and is
112intended to run in tandem with a build of a project or code base.
113
114
115%package -n clang-doc
116Summary:        Documentation for Clang
117Summary(ja):    Clang のドキュメント
118Group:          Documentation
119Requires:       %{name} = %{version}-%{release}
120
121%description -n clang-doc
122Documentation for the Clang compiler front-end.
123
124
125%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
126%package apidoc
127Summary:        API documentation for LLVM
128Summary(ja):    LLVM の API ドキュメント
129Group:          Development/Languages
130Requires:       %{name}-docs = %{version}-%{release}
131
132
133%description apidoc
134API documentation for the LLVM compiler infrastructure.
135%endif
136
137
138%package        ocaml
139Summary:        OCaml binding for LLVM
140Summary(ja):    LLVM の OCaml バインディング
141Group:          Development/Libraries
142Requires:       %{name} = %{version}-%{release}
143Requires:       ocaml
144
145%description    ocaml
146OCaml binding for LLVM.
147
148
149%package        ocaml-devel
150Summary:        Development files for %{name}-ocaml
151Summary(ja):    %{name}-ocaml の開発ファイル
152Group:          Development/Libraries
153Requires:       %{name}-devel = %{version}-%{release}
154Requires:       %{name}-ocaml = %{version}-%{release}
155Requires:       ocaml
156
157%description    ocaml-devel
158The %{name}-ocaml-devel package contains libraries and signature files
159for developing applications that use %{name}-ocaml.
160
161
162%package ocaml-doc
163Summary:        Documentation for %{name}-ocaml
164Summary(ja):    %{name}-ocaml のドキュメント
165Group:          Documentation
166Requires:       %{name}-ocaml = %{version}-%{release}
167
168%description ocaml-doc
169HTML documentation for LLVM's OCaml binding.
170
171
172
173%prep
174%setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2}
175mv clang-%{version} tools/clang
176
177%patch0 -p1 -b .timestamp
178
179# Encoding fix
180(cd tools/clang/docs && \
181    iconv -f ISO88591 -t UTF8 BlockImplementation.txt \
182    -o BlockImplementation.txt)
183
184
185%build
186# Disabling assertions now, rec. by pure and needed for OpenGTL
187# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
188mkdir obj && cd obj
189../configure \
190  --prefix=%{_prefix} \
191  --libdir=%{_libdir}/%{name} \
192  --disable-assertions \
193  --enable-jit \
194  --enable-shared
195
196# FIXME file this
197# configure does not properly specify libdir
198sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
199
200make %{_smp_mflags} \
201%ifarch ppc
202  OPTIMIZE_OPTION="%{optflags} -fno-var-tracking-assignments"
203%else
204  OPTIMIZE_OPTION="%{optflags}"
205%endif
206
207
208%check
209cd obj
210# no current unexpected failures. Use || true if they recur to force ignore
211make check 2>&1 | tee ../llvm-testlog.txt
212(cd tools/clang && make test 2>&1) | tee ../clang-testlog.txt
213
214
215%install
216rm -rf %{buildroot}
217pushd obj
218chmod -x examples/Makefile
219
220make install DESTDIR=%{buildroot} \
221     PROJ_docsdir=/moredocs
222popd
223
224# Create ld.so.conf.d entry
225mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
226cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF
227%{_libdir}/llvm
228EOF
229
230# Static analyzer not installed by default:
231# http://clang-analyzer.llvm.org/installation#OtherPlatforms
232mkdir -p %{buildroot}%{_libdir}/clang-analyzer
233# create launchers
234for f in scan-{build,view}; do
235  ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
236done
237
238(cd tools/clang/tools && cp -pr scan-{build,view} \
239 %{buildroot}%{_libdir}/clang-analyzer/)
240
241
242# Move documentation back to build directory
243#
244mv %{buildroot}/moredocs .
245rm moredocs/*.tar.gz
246rm moredocs/ocamldoc/html/*.tar.gz
247
248# And prepare Clang documentation
249#
250mkdir clang-docs
251for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
252  ln tools/clang/$f clang-docs/
253done
254rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
255
256
257#find %{buildroot} -name .dir -print0 | xargs -0r rm -f
258file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
259file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
260#chrpath -d %{buildroot}/%{_libexecdir}/clang-cc
261
262# Get rid of erroneously installed example files.
263rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
264
265# FIXME file this bug
266sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
267  %{buildroot}%{_bindir}/llvm-config
268
269chmod -x %{buildroot}%{_libdir}/%{name}/*.a
270
271# remove documentation makefiles:
272# they require the build directory to work
273find examples -name 'Makefile' | xargs -0r rm -f
274
275
276%clean
277rm -rf %{buildroot}
278
279
280%post -p /sbin/ldconfig
281
282
283%postun -p /sbin/ldconfig
284
285
286%files
287%defattr(-,root,root,-)
288%doc CREDITS.TXT LICENSE.TXT README.txt llvm-testlog.txt
289%{_bindir}/bugpoint
290%{_bindir}/llc
291%{_bindir}/lli
292%exclude %{_bindir}/llvm-config
293%{_bindir}/llvm*
294%{_bindir}/opt
295%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
296%dir %{_libdir}/llvm
297%{_libdir}/llvm/*.so
298%exclude %{_mandir}/man1/clang.1.*
299%doc %{_mandir}/man1/*.1.*
300
301%files devel
302%defattr(-,root,root,-)
303%{_bindir}/llvm-config
304%{_includedir}/%{name}
305%{_includedir}/%{name}-c
306%{_libdir}/%{name}/*.a
307
308%files -n clang
309%defattr(-,root,root,-)
310%doc clang-docs/* clang-testlog.txt
311%{_bindir}/clang*
312%{_bindir}/tblgen
313%{_prefix}/lib/clang
314%doc %{_mandir}/man1/clang.1.*
315
316%files -n clang-devel
317%defattr(-,root,root,-)
318%{_includedir}/clang
319%{_includedir}/clang-c
320
321%files -n clang-analyzer
322%defattr(-,root,root,-)
323%{_bindir}/scan-build
324%{_bindir}/scan-view
325%{_libdir}/clang-analyzer
326
327%files -n clang-doc
328%defattr(-,root,root,-)
329%doc tools/clang/docs/*
330
331%files doc
332%defattr(-,root,root,-)
333%doc examples moredocs/html
334
335%files ocaml
336%defattr(-,root,root,-)
337%{_libdir}/ocaml/*.cma
338%{_libdir}/ocaml/*.cmi
339
340%files ocaml-devel
341%defattr(-,root,root,-)
342%{_libdir}/ocaml/*.a
343%{_libdir}/ocaml/*.cmx*
344%{_libdir}/ocaml/*.mli
345
346%files ocaml-doc
347%defattr(-,root,root,-)
348%doc moredocs/ocamldoc/html/*
349
350%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
351%files apidoc
352%defattr(-,root,root,-)
353%doc docs/doxygen
354%endif
355
356
357
358%changelog
359* Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
360- initial build for Vine Linux
361
362* Sun May  2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
363- Update to final 2.7 release
364
365* Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
366- Update to first 2.7 pre-release
367
368* Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
369- Update to 2.6 pre-release2
370- -devel subpackage now virtually provides -static
371
372* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
373- Disable var tracking assignments on PPC
374
375* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
376- Don't adjust clang include dir; files there are noarch (bz#521893)
377- Enable clang unit tests
378- clang and clang-analyzer renamed; no longer depend on llvm at runtime
379
380* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
381- Package Clang's static analyzer tools
382
383* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
384- PIC is now enabled by default; explicitly disable on %%{ix86}
385
386* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
387- First 2.6 prerelease
388- Enable Clang front-end
389- Enable debuginfo generation
390
391* Sat Sep  5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
392- Disable assertions (needed by OpenGTL, bz#521261)
393- Align spec file with upstream build instructions
394- Enable unit tests
395
396* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
397- Only disable PIC on %%ix86; ppc actually needs it
398
399* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
400- Disable use of position-independent code on 32-bit platforms
401  (buggy in LLVM <= 2.5)
402
403* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
404- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
405
406* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
407- Remove build scripts; they require the build directory to work
408
409* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
410- Update to 2.5
411- Package build scripts (bug #457881)
412
413* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
414- Patched build process for the OCaml binding
415
416* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
417- Update to 2.4
418- Package Ocaml binding
419
420* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
421- Add dependency on groff
422
423* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
424- LLVM 2.3
425
426* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
427- fix license tags
428
429* Wed Mar  5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
430- Fix compilation problems with gcc 4.3
431
432* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
433- Autorebuild for GCC 4.3
434
435* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
436- Fix review comments
437
438* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
439- Initial version
Note: See TracBrowser for help on using the repository browser.