forked from vmware/photon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclang.spec
86 lines (73 loc) · 2.17 KB
/
clang.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Summary: C, C++, Objective C and Objective C++ front-end for the LLVM compiler.
Name: clang
Version: 6.0.1
Release: 1%{?dist}
License: NCSA
URL: http://clang.llvm.org
Group: Development/Tools
Vendor: VMware, Inc.
Distribution: Photon
Source0: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
%define sha1 cfe=d93d8f3e3d7eb549ac58507383f7fcbdd78804d7
BuildRequires: cmake
BuildRequires: llvm-devel = %{version}
BuildRequires: ncurses-devel
BuildRequires: zlib-devel
BuildRequires: libxml2-devel
BuildRequires: python2-devel
Requires: libstdc++-devel
Requires: ncurses
Requires: llvm
Requires: zlib
Requires: libxml2
Requires: python2
%description
The goal of the Clang project is to create a new C based language front-end: C, C++, Objective C/C++, OpenCL C and others for the LLVM compiler. You can get and build the source today.
%package devel
Summary: Development headers for clang
Requires: %{name} = %{version}-%{release}
%description devel
The clang-devel package contains libraries, header files and documentation
for developing applications that use clang.
%prep
%setup -q -n cfe-%{version}.src
%build
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-Wno-dev ..
make %{?_smp_mflags}
%install
[ %{buildroot} != "/"] && rm -rf %{buildroot}/*
cd build
make DESTDIR=%{buildroot} install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%check
cd build
make clang-check
%clean
rm -rf %{buildroot}/*
%files
%defattr(-,root,root)
%{_bindir}/*
%{_libexecdir}/*
%{_libdir}/*.so.*
%{_datadir}/*
%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/cmake/*
%{_libdir}/clang/*
%{_includedir}/*
%changelog
* Thu Aug 09 2018 Srivatsa S. Bhat <[email protected]> 6.0.1-1
- Update to version 6.0.1 to get it to build with gcc 7.3
* Wed Jun 28 2017 Chang Lee <[email protected]> 4.0.0-2
- Updated %check
* Fri Apr 7 2017 Alexey Makhalov <[email protected]> 4.0.0-1
- Version update
* Wed Jan 11 2017 Xiaolin Li <[email protected]> 3.9.1-1
- Initial build.