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