move license file to llvm-libs, and minor spec file cleanup
- remove tabs (rpmlint) - use %name to keep llvm34.spec closer - remove %defattr's (does recent llvm even build on RHEL5?)
This commit is contained in:
parent
cb08fc50fa
commit
a8e5b07ec1
105
llvm.spec
105
llvm.spec
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
Name: llvm
|
Name: llvm
|
||||||
Version: 3.5.0
|
Version: 3.5.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -43,18 +43,18 @@ License: NCSA
|
|||||||
URL: http://llvm.org/
|
URL: http://llvm.org/
|
||||||
|
|
||||||
# source archives
|
# source archives
|
||||||
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
||||||
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
||||||
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
|
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
|
||||||
Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
||||||
|
|
||||||
# multilib fixes
|
# multilib fixes
|
||||||
Source10: llvm-Config-config.h
|
Source10: llvm-Config-config.h
|
||||||
Source11: llvm-Config-llvm-config.h
|
Source11: llvm-Config-llvm-config.h
|
||||||
|
|
||||||
# patches
|
# patches
|
||||||
Patch1: llvm-3.5.0-build-fix.patch
|
Patch1: llvm-3.5.0-build-fix.patch
|
||||||
Patch2: 0001-data-install-preserve-timestamps.patch
|
Patch2: 0001-data-install-preserve-timestamps.patch
|
||||||
|
|
||||||
# the next two are various attempts to get clang to actually work on arm
|
# the next two are various attempts to get clang to actually work on arm
|
||||||
# by forcing a hard-float ABI. They don't apply anymore as of 3.5.0,
|
# by forcing a hard-float ABI. They don't apply anymore as of 3.5.0,
|
||||||
@ -63,17 +63,17 @@ Patch2: 0001-data-install-preserve-timestamps.patch
|
|||||||
#
|
#
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=803433
|
# https://bugzilla.redhat.com/show_bug.cgi?id=803433
|
||||||
# http://llvm.org/bugs/show_bug.cgi?id=15666
|
# http://llvm.org/bugs/show_bug.cgi?id=15666
|
||||||
Patch20: clang-3.4-arm-hard-float.patch
|
#Patch20: clang-3.4-arm-hard-float.patch
|
||||||
# http://llvm.org/bugs/attachment.cgi?id=12586
|
# http://llvm.org/bugs/attachment.cgi?id=12586
|
||||||
Patch22: pr12586.patch
|
#Patch22: pr12586.patch
|
||||||
|
|
||||||
# newish glibc hides the definition of __extern_always_inline behind
|
# newish glibc hides the definition of __extern_always_inline behind
|
||||||
# a check for gcc 4.3, clang pretends to be gcc 4.2. a proper fix would
|
# a check for gcc 4.3, clang pretends to be gcc 4.2. a proper fix would
|
||||||
# be to build everything herein with gcc, but i don't have the patience
|
# be to build everything herein with gcc, but i don't have the patience
|
||||||
# atm, so in the interest of bootstrapping...
|
# atm, so in the interest of bootstrapping...
|
||||||
Patch100: clang-fake-gcc43.patch
|
Patch100: clang-fake-gcc43.patch
|
||||||
|
|
||||||
Patch200: lldb-python.patch
|
Patch200: lldb-python.patch
|
||||||
|
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
@ -97,7 +97,7 @@ BuildRequires: doxygen graphviz
|
|||||||
%endif
|
%endif
|
||||||
# pod2man moved to perl-podlators in F19
|
# pod2man moved to perl-podlators in F19
|
||||||
BuildRequires: %{_bindir}/pod2man
|
BuildRequires: %{_bindir}/pod2man
|
||||||
Requires: llvm-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
LLVM is a compiler infrastructure designed for compile-time,
|
LLVM is a compiler infrastructure designed for compile-time,
|
||||||
@ -153,9 +153,9 @@ Shared libraries for the LLVM compiler infrastructure.
|
|||||||
|
|
||||||
|
|
||||||
%package static
|
%package static
|
||||||
Summary: LLVM static libraries
|
Summary: LLVM static libraries
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description static
|
%description static
|
||||||
Static libraries for the LLVM compiler infrastructure. Not recommended
|
Static libraries for the LLVM compiler infrastructure. Not recommended
|
||||||
@ -167,7 +167,7 @@ for general consumption.
|
|||||||
Summary: A C language family front-end for LLVM
|
Summary: A C language family front-end for LLVM
|
||||||
License: NCSA
|
License: NCSA
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: llvm%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
# clang requires gcc, clang++ requires libstdc++-devel
|
# clang requires gcc, clang++ requires libstdc++-devel
|
||||||
Requires: libstdc++-devel
|
Requires: libstdc++-devel
|
||||||
# remove clang-doc pacakge
|
# remove clang-doc pacakge
|
||||||
@ -185,8 +185,8 @@ as libraries and designed to be loosely-coupled and extensible.
|
|||||||
|
|
||||||
|
|
||||||
%Package -n clang-libs
|
%Package -n clang-libs
|
||||||
Summary: Runtime library for clang
|
Summary: Runtime library for clang
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
|
||||||
%description -n clang-libs
|
%description -n clang-libs
|
||||||
Runtime library for clang.
|
Runtime library for clang.
|
||||||
@ -224,7 +224,7 @@ intended to run in tandem with a build of a project or code base.
|
|||||||
Summary: Next generation high-performance debugger
|
Summary: Next generation high-performance debugger
|
||||||
License: NCSA
|
License: NCSA
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: llvm%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
BuildRequires: libedit-devel
|
BuildRequires: libedit-devel
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
@ -320,8 +320,8 @@ mv lldb-*/ tools/lldb
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
#patch20 -p1
|
#patch20 -p1
|
||||||
%endif
|
|
||||||
#patch22 -p1
|
#patch22 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
pushd tools/clang
|
pushd tools/clang
|
||||||
@ -338,7 +338,7 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# fix library paths
|
# fix library paths
|
||||||
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure
|
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' configure
|
||||||
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in
|
||||||
sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
|
sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
|
||||||
|
|
||||||
@ -425,8 +425,8 @@ popd
|
|||||||
|
|
||||||
# Create ld.so.conf.d entry
|
# Create ld.so.conf.d entry
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||||
cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf << EOF
|
cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
|
||||||
%{_libdir}/llvm
|
%{_libdir}/%{name}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
@ -472,25 +472,19 @@ cp tools/lldb/docs/lldb.1 %{buildroot}%{_mandir}/man1/
|
|||||||
find %{buildroot}/moredocs/ -name "*.tar.gz" -print0 | xargs -0 rm -rf
|
find %{buildroot}/moredocs/ -name "*.tar.gz" -print0 | xargs -0 rm -rf
|
||||||
mkdir -p %{buildroot}%{_docdir}
|
mkdir -p %{buildroot}%{_docdir}
|
||||||
|
|
||||||
# llvm
|
|
||||||
mkdir -p %{buildroot}%{llvmdocdir llvm}
|
|
||||||
for f in CREDITS.TXT LICENSE.TXT README.txt; do
|
|
||||||
cp $f %{buildroot}%{llvmdocdir llvm}
|
|
||||||
done
|
|
||||||
|
|
||||||
# llvm-doc
|
# llvm-doc
|
||||||
mkdir -p %{buildroot}%{llvmdocdir llvm-doc}
|
mkdir -p %{buildroot}%{llvmdocdir %{name}-doc}
|
||||||
cp -ar examples %{buildroot}%{llvmdocdir llvm-doc}/examples
|
cp -ar examples %{buildroot}%{llvmdocdir %{name}-doc}/examples
|
||||||
find %{buildroot}%{llvmdocdir llvm-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f
|
find %{buildroot}%{llvmdocdir %{name}-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f
|
||||||
|
|
||||||
# llvm-apidoc
|
# llvm-apidoc
|
||||||
%if %{with doxygen}
|
%if %{with doxygen}
|
||||||
mv %{buildroot}/moredocs/html/doxygen %{buildroot}%{llvmdocdir llvm-apidoc}
|
mv %{buildroot}/moredocs/html/doxygen %{buildroot}%{llvmdocdir %{name}-apidoc}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# llvm-ocaml-doc
|
# llvm-ocaml-doc
|
||||||
%if %{with ocaml}
|
%if %{with ocaml}
|
||||||
mv %{buildroot}/moredocs/ocamldoc/html %{buildroot}%{llvmdocdir llvm-ocaml-doc}
|
mv %{buildroot}/moredocs/ocamldoc/html %{buildroot}%{llvmdocdir %{name}-ocaml-doc}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# clang
|
# clang
|
||||||
@ -523,7 +517,7 @@ cp -p cmake/modules/*.cmake %{buildroot}%{_datadir}/llvm/cmake/
|
|||||||
|
|
||||||
# remove RPATHs
|
# remove RPATHs
|
||||||
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# the Koji build server does not seem to have enough RAM
|
# the Koji build server does not seem to have enough RAM
|
||||||
@ -533,8 +527,8 @@ file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r
|
|||||||
# broken makefiles in the doc dirs.
|
# broken makefiles in the doc dirs.
|
||||||
|
|
||||||
# LLVM test suite failing on ARM, PPC64 and s390(x)
|
# LLVM test suite failing on ARM, PPC64 and s390(x)
|
||||||
mkdir -p %{buildroot}%{llvmdocdir llvm-devel}
|
mkdir -p %{buildroot}%{llvmdocdir %{name}-devel}
|
||||||
make -k check LIT_ARGS="-v -j4" | tee %{buildroot}%{llvmdocdir llvm-devel}/testlog-%{_arch}.txt || :
|
make -k check LIT_ARGS="-v -j4" | tee %{buildroot}%{llvmdocdir %{name}-devel}/testlog-%{_arch}.txt || :
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
# clang test suite failing on PPC and s390(x)
|
# clang test suite failing on PPC and s390(x)
|
||||||
@ -584,8 +578,8 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%doc CREDITS.TXT
|
||||||
%doc %{llvmdocdir llvm}/
|
%doc README.txt
|
||||||
%dir %{_datadir}/llvm
|
%dir %{_datadir}/llvm
|
||||||
%{_bindir}/bugpoint
|
%{_bindir}/bugpoint
|
||||||
%{_bindir}/llc
|
%{_bindir}/llc
|
||||||
@ -605,16 +599,15 @@ exit 0
|
|||||||
%doc %{_mandir}/man1/*.1.*
|
%doc %{_mandir}/man1/*.1.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%doc %{llvmdocdir %{name}-devel}/
|
||||||
%doc %{llvmdocdir llvm-devel}/
|
|
||||||
%{_bindir}/llvm-config-%{__isa_bits}
|
%{_bindir}/llvm-config-%{__isa_bits}
|
||||||
%{_includedir}/%{name}
|
%{_includedir}/%{name}
|
||||||
%{_includedir}/%{name}-c
|
%{_includedir}/%{name}-c
|
||||||
%{_datadir}/llvm/cmake
|
%{_datadir}/llvm/cmake
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%defattr(-,root,root,-)
|
%doc LICENSE.TXT
|
||||||
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
%exclude %{_libdir}/%{name}/libclang.so
|
%exclude %{_libdir}/%{name}/libclang.so
|
||||||
@ -625,12 +618,10 @@ exit 0
|
|||||||
%{_libdir}/%{name}/*.so
|
%{_libdir}/%{name}/*.so
|
||||||
|
|
||||||
%files static
|
%files static
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/%{name}/*.a
|
%{_libdir}/%{name}/*.a
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
%files -n clang
|
%files -n clang
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc %{llvmdocdir clang}/
|
%doc %{llvmdocdir clang}/
|
||||||
%{_bindir}/clang*
|
%{_bindir}/clang*
|
||||||
%{_bindir}/c-index-test
|
%{_bindir}/c-index-test
|
||||||
@ -638,17 +629,14 @@ exit 0
|
|||||||
%doc %{_mandir}/man1/clang.1.*
|
%doc %{_mandir}/man1/clang.1.*
|
||||||
|
|
||||||
%files -n clang-libs
|
%files -n clang-libs
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/%{name}/libclang.so
|
%{_libdir}/%{name}/libclang.so
|
||||||
|
|
||||||
%files -n clang-devel
|
%files -n clang-devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc %{llvmdocdir clang-devel}/
|
%doc %{llvmdocdir clang-devel}/
|
||||||
%{_includedir}/clang
|
%{_includedir}/clang
|
||||||
%{_includedir}/clang-c
|
%{_includedir}/clang-c
|
||||||
|
|
||||||
%files -n clang-analyzer
|
%files -n clang-analyzer
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_mandir}/man1/scan-build.1.*
|
%{_mandir}/man1/scan-build.1.*
|
||||||
%{_bindir}/scan-build
|
%{_bindir}/scan-build
|
||||||
%{_bindir}/scan-view
|
%{_bindir}/scan-view
|
||||||
@ -657,7 +645,6 @@ exit 0
|
|||||||
|
|
||||||
%if %{with lldb}
|
%if %{with lldb}
|
||||||
%files -n lldb
|
%files -n lldb
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc %{llvmdocdir lldb}/
|
%doc %{llvmdocdir lldb}/
|
||||||
%{_bindir}/lldb
|
%{_bindir}/lldb
|
||||||
%{_bindir}/lldb-*
|
%{_bindir}/lldb-*
|
||||||
@ -667,46 +654,46 @@ exit 0
|
|||||||
%doc %{_mandir}/man1/lldb.1.*
|
%doc %{_mandir}/man1/lldb.1.*
|
||||||
|
|
||||||
%files -n lldb-devel
|
%files -n lldb-devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_includedir}/lldb
|
%{_includedir}/lldb
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root,-)
|
%doc %{llvmdocdir %{name}-doc}/
|
||||||
%doc %{llvmdocdir llvm-doc}/
|
|
||||||
|
|
||||||
%if %{with ocaml}
|
%if %{with ocaml}
|
||||||
%files ocaml
|
%files ocaml
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/ocaml/*.cma
|
%{_libdir}/ocaml/*.cma
|
||||||
%{_libdir}/ocaml/*.cmi
|
%{_libdir}/ocaml/*.cmi
|
||||||
%{_libdir}/ocaml/dll*.so
|
%{_libdir}/ocaml/dll*.so
|
||||||
%{_libdir}/ocaml/META.llvm*
|
%{_libdir}/ocaml/META.llvm*
|
||||||
|
|
||||||
%files ocaml-devel
|
%files ocaml-devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/ocaml/*.a
|
%{_libdir}/ocaml/*.a
|
||||||
%{_libdir}/ocaml/*.cmx*
|
%{_libdir}/ocaml/*.cmx*
|
||||||
%{_libdir}/ocaml/*.mli
|
%{_libdir}/ocaml/*.mli
|
||||||
|
|
||||||
%files ocaml-doc
|
%files ocaml-doc
|
||||||
%defattr(-,root,root,-)
|
%doc %{llvmdocdir %{name}-ocaml-doc}/
|
||||||
%doc %{llvmdocdir llvm-ocaml-doc}/
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with doxygen}
|
%if %{with doxygen}
|
||||||
%files apidoc
|
%files apidoc
|
||||||
%defattr(-,root,root,-)
|
%doc %{llvmdocdir %{name}-apidoc}/
|
||||||
%doc %{llvmdocdir llvm-apidoc}/
|
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
%files -n clang-apidoc
|
%files -n clang-apidoc
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc %{llvmdocdir clang-apidoc}/
|
%doc %{llvmdocdir clang-apidoc}/
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 19 2014 Jens Petersen <petersen@redhat.com> - 3.5.0-4
|
||||||
|
- minor spec file cleanup from llvm34 package review:
|
||||||
|
- move LICENSE to llvm-libs
|
||||||
|
- remove tabs from spec
|
||||||
|
- use name macro to keep llvm34.spec closer
|
||||||
|
- remove defattr's
|
||||||
|
|
||||||
* Wed Nov 05 2014 Adam Jackson <ajax@redhat.com> 3.5.0-3
|
* Wed Nov 05 2014 Adam Jackson <ajax@redhat.com> 3.5.0-3
|
||||||
- Split out clang-libs
|
- Split out clang-libs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user