]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- fix some files
[packages/llvm.git] / llvm.spec
CommitLineData
bc88141a
ER
1# TODO
2# - gcc/c++ packages: http://cvs.fedoraproject.org/viewvc/rpms/llvm/devel/llvm.spec?revision=HEAD&view=markup
6832a5c5 3# - test gcc pkgs and all
bc88141a 4#
6832a5c5 5%define lgcc_vertar 4.2
d997b14b 6%define lgcc_version 4.2
aa11c230 7Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
2326a99f 8Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
aa11c230 9Name: llvm
d997b14b 10Version: 2.6
aa11c230 11Release: 0.1
12License: University of Illinois/NCSA Open Source License
13Group: Development/Languages
d997b14b
AM
14Source0: http://llvm.org/prereleases/%{version}/%{name}-%{version}.tar.gz
15# Source0-md5: d4d2cfbb962eca0c96aa1d794e23a681
16Source1: http://llvm.org/prereleases/2.6/clang-%{version}.tar.gz
17# Source1-md5: 80a2a9bbe8fa7c403b2ec7aca8b4108f
18# http://llvm.org/bugs/show_bug.cgi?id=3153
19Patch0: %{name}-2.6-destdir.patch
20Patch1: %{name}-2.6-destdir-clang.patch
21# http://llvm.org/bugs/show_bug.cgi?id=4911
22Patch2: %{name}-2.5-tclsh_check.patch
23# Data files should be installed with timestamps preserved
24Patch3: %{name}-2.6-timestamp.patch
2326a99f 25URL: http://llvm.org/
bc88141a 26BuildRequires: bash
d997b14b
AM
27BuildRequires: bison
28BuildRequires: doxygen
29BuildRequires: flex
30BuildRequires: graphviz
31BuildRequires: groff
bc88141a 32BuildRequires: libltdl-devel
d997b14b
AM
33BuildRequires: libstdc++-devel >= 5:3.4
34BuildRequires: ocaml-ocamldoc
356a0bbd
ER
35# gcc4 might be installed, but not current __cc
36%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
37BuildRequires: __cc >= 3.4
38%endif
aa11c230 39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
356a0bbd 41%define _sysconfdir /etc/%{name}
021b3c3d 42
6832a5c5
ER
43# strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
44%define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
45
aa11c230 46%description
47LLVM is a compiler infrastructure designed for compile-time,
48link-time, runtime, and idle-time optimization of programs from
49arbitrary programming languages. LLVM is written in C++ and has been
50developed since 2000 at the University of Illinois and Apple. It
51currently supports compilation of C and C++ programs, using front-ends
52derived from GCC 4.0.1. A new front-end for the C family of languages
53is in development. The compiler infrastructure includes mirror sets of
54programming tools as well as libraries with equivalent functionality.
55
2326a99f
JB
56%description -l pl.UTF-8
57LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
58czasu kompilowania, linkowania, działania i bezczynności programów w
59dowolnych językach programowania. Jest napisana w C++, rozwijana od
60roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
61kompilację programów w C i C++ przy użyciu frontendów wywodzących się
62z GCC 4.0.1. W trakcie tworzenia jest nowy frontend do języków z
63rodziny C. Infrastruktura kompilatora zawiera lustrzane zestawy
64narzędzi programistycznych oraz biblioteki z odpowiadającą narzędziom
65funkcjonalnością.
66
bc88141a
ER
67%package doc
68Summary: Documentation for LLVM
69Group: Documentation
70Requires: %{name} = %{version}-%{release}
71
72%description doc
73Documentation for the LLVM compiler infrastructure.
74
75%package devel
76Summary: Libraries and header files for LLVM
77Group: Development/Languages
78Requires: %{name} = %{version}-%{release}
79Requires: libstdc++-devel >= 6:3.4
80
81%description devel
82This package contains library and header files needed to develop new
83native programs that use the LLVM infrastructure.
84
bc88141a
ER
85%package ocaml
86Summary: OCaml binding for LLVM
87Group: Development/Libraries
88Requires: %{name} = %{version}-%{release}
89%requires_eq ocaml-runtime
90
91%description ocaml
92OCaml binding for LLVM.
93
94%package ocaml-devel
95Summary: Development files for %{name}-ocaml
96Group: Development/Libraries
97Requires: %{name}-devel = %{version}-%{release}
98Requires: %{name}-ocaml = %{version}-%{release}
99
100%description ocaml-devel
101The %{name}-ocaml-devel package contains libraries and signature files
102for developing applications that use %{name}-ocaml.
103
d997b14b
AM
104%package -n clang
105Summary: A C language family frontend for LLVM
106License: NCSA
107Group: Development/Languages
108
109%description -n clang
110clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
111of a crane or goose. 3. C-language family front-end toolkit.
112
113The goal of the Clang project is to create a new C, C++, Objective C
114and Objective C++ front-end for the LLVM compiler. Its tools are built
115as libraries and designed to be loosely-coupled and extendable.
116
117%package -n clang-analyzer
118Summary: A source code analysis framework
119License: NCSA
120Group: Development/Languages
121Requires: clang = %{version}-%{release}
122# not picked up automatically since files are currently not instaled
123# in standard Python hierarchies yet
124Requires: python
125
126%description -n clang-analyzer
127The Clang Static Analyzer consists of both a source code analysis
128framework and a standalone tool that finds bugs in C and Objective-C
129programs. The standalone tool is invoked from the command-line, and is
130intended to run in tandem with a build of a project or code base.
131
aa11c230 132%prep
d997b14b
AM
133%setup -q -a1
134mv clang-*.* tools/clang
135%patch0 -p0 -b .destdir
136cd tools/clang
137%patch1 -p0 -b .destdir-clang
138cd ../..
139%patch2 -p1 -b .tclsh_check
140%patch3 -p1 -b .timestamp
aa11c230 141
142%build
d997b14b
AM
143# Disabling assertions now, rec. by pure and needed for OpenGTL
144# no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3239
145#
bc88141a 146# bash specific 'test a < b'
d997b14b
AM
147mkdir obj && cd obj
148bash ../%configure \
bc88141a
ER
149 --libdir=%{_libdir}/%{name} \
150 --datadir=%{_datadir}/%{name}-%{version} \
d997b14b
AM
151%ifarch %{ix86}
152 --enable-pic=no \
153%endif
bc88141a 154 --disable-static \
d997b14b 155 --disable-assertions \
bc88141a
ER
156 --enable-debug-runtime \
157 --enable-jit \
aa11c230 158 --enable-optimized \
bc88141a
ER
159 --enable-shared \
160 --with-pic
161
d997b14b
AM
162# FIXME file this
163# configure does not properly specify libdir
164sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
bc88141a 165
d997b14b
AM
166%{__make} \
167 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
aa11c230 168
169%install
170rm -rf $RPM_BUILD_ROOT
171
d997b14b
AM
172cd obj
173chmod -x examples/Makefile
174
175%{__make} -j1 install \
176 PROJ_docsdir=/moredocs \
aa11c230 177 DESTDIR=$RPM_BUILD_ROOT
d997b14b 178cd ..
aa11c230 179
d997b14b
AM
180# Static analyzer not installed by default:
181# http://clang-analyzer.llvm.org/installation#OtherPlatforms
182install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/libexec
183# wrong path used
184install -d $RPM_BUILD_ROOT%{_libexecdir}
185mv $RPM_BUILD_ROOT/usr/libexec/clang-cc $RPM_BUILD_ROOT%{_libexecdir}/clang-cc
186# link clang-cc for scan-build to find
187ln -s %{_libexecdir}/clang-cc $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/libexec/
188# create launchers
189for f in scan-{build,view}; do
190 ln -s %{_libdir}/clang-analyzer/$f $RPM_BUILD_ROOT%{_bindir}/$f
191done
192
193cd tools/clang/utils
194cp -p ccc-analyzer $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/libexec/
195
196for f in scan-build scanview.css sorttable.js; do
197 cp -p $f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/
198done
199cd ../../..
200
201cd tools/clang/tools/scan-view
202cp -pr * $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/
203cd ../../../../
204
205# Move documentation back to build directory
206#
207rm -rf moredocs
208mv $RPM_BUILD_ROOT/moredocs .
209rm moredocs/*.tar.gz
210#rm moredocs/ocamldoc/html/*.tar.gz
211
212# And prepare Clang documentation
213#
214rm -rf clang-docs
215mkdir clang-docs
216for f in LICENSE.TXT NOTES.txt README.txt TODO.txt; do
217 ln tools/clang/$f clang-docs/
218done
219#rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
021b3c3d 220
6832a5c5 221# Get rid of erroneously installed example files.
d997b14b 222rm $RPM_BUILD_ROOT%{_libdir}/%{name}/*LLVMHello.*
6832a5c5 223
d997b14b
AM
224# Remove deprecated tools.
225rm $RPM_BUILD_ROOT%{_bindir}/gcc{as,ld}
6832a5c5 226
d997b14b
AM
227# FIXME file this bug
228sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
229 $RPM_BUILD_ROOT%{_bindir}/llvm-config
6832a5c5 230
d997b14b
AM
231chmod -x $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a
232
233# remove documentation makefiles:
234# they require the build directory to work
235find examples -name 'Makefile' | xargs -0r rm -f
6832a5c5 236
aa11c230 237%clean
238rm -rf $RPM_BUILD_ROOT
239
2326a99f
JB
240%post -p /sbin/ldconfig
241%postun -p /sbin/ldconfig
aa11c230 242
243%files
244%defattr(644,root,root,755)
bc88141a 245%doc CREDITS.TXT LICENSE.TXT README.txt
a9beeab5 246%attr(755,root,root) %{_bindir}/bugpoint
a9beeab5
JB
247%attr(755,root,root) %{_bindir}/llc
248%attr(755,root,root) %{_bindir}/lli
a9beeab5 249%attr(755,root,root) %{_bindir}/opt
a8575aac 250%attr(755,root,root) %{_bindir}/llvmc
bc88141a
ER
251%attr(755,root,root) %{_bindir}/llvm-*
252%exclude %attr(755,root,root) %{_bindir}/llvm-config
a9beeab5
JB
253%{_mandir}/man1/bugpoint.1*
254%{_mandir}/man1/llc.1*
255%{_mandir}/man1/lli.1*
d997b14b 256%{_mandir}/man1/llvmc.1*
a9beeab5 257%{_mandir}/man1/llvm-*.1*
a9beeab5
JB
258%{_mandir}/man1/llvmgcc.1*
259%{_mandir}/man1/llvmgxx.1*
260%{_mandir}/man1/opt.1*
a8575aac 261#%{_mandir}/man1/stkrc.1*
a9beeab5 262%{_mandir}/man1/tblgen.1*
bc88141a
ER
263
264%files doc
265%defattr(644,root,root,755)
d997b14b 266%doc docs/*.{html,css} docs/img examples moredocs/html
bc88141a
ER
267
268%files devel
269%defattr(644,root,root,755)
d997b14b 270#%doc docs/doxygen
bc88141a
ER
271%attr(755,root,root) %{_bindir}/llvm-config
272%{_includedir}/llvm
273%{_includedir}/llvm-c
d997b14b 274%{_libdir}/%{name}
bc88141a 275
d997b14b 276%files -n clang
bc88141a 277%defattr(644,root,root,755)
d997b14b
AM
278%doc clang-docs/*
279%doc tools/clang/docs/*
280%attr(755,root,root) %{_bindir}/clang*
281%attr(755,root,root) %{_bindir}/FileCheck
282%attr(755,root,root) %{_bindir}/FileUpdate
283%attr(755,root,root) %{_bindir}/tblgen
284%{_prefix}/lib/clang
285%{_libexecdir}/clang-cc
286%{_mandir}/man1/clang.1.*
287%{_mandir}/man1/FileCheck.1.*
288
289%files -n clang-analyzer
bc88141a 290%defattr(644,root,root,755)
d997b14b
AM
291%attr(755,root,root) %{_bindir}/scan-build
292%attr(755,root,root) %{_bindir}/scan-view
ae49e501
AM
293%dir %{_libdir}/clang-analyzer
294%attr(755,root,root) %{_libdir}/clang-analyzer/scan-*
295%{_libdir}/clang-analyzer/*.*
296%dir %{_libdir}/clang-analyzer/libexec
297%attr(755,root,root) %{_libdir}/clang-analyzer/libexec/*
298%{_libdir}/clang-analyzer/Resource
d997b14b
AM
299
300%files ocaml
301%defattr(644,root,root,755)
302%doc moredocs/ocamldoc/html/*
303%{_libdir}/ocaml/*.cma
304%{_libdir}/ocaml/*.cmi
305
306%files ocaml-devel
307%defattr(644,root,root,755)
308%{_libdir}/ocaml/*.a
309%{_libdir}/ocaml/*.cmx*
310%{_libdir}/ocaml/*.mli
This page took 0.148189 seconds and 4 git commands to generate.