From bb3667dc84795ed07d3d45a8f920db2960742c00 Mon Sep 17 00:00:00 2001 From: chunseok lee Date: Fri, 3 Mar 2017 17:11:50 +0900 Subject: [PATCH] change lldb path from /usr/local to on-demand(sdk) path Change-Id: Id1fd1bba441f56d7ecd8ffacd225b23b113e9881 Signed-off-by: chunseok lee --- packaging/llvm.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 10 deletions(-) diff --git a/packaging/llvm.spec b/packaging/llvm.spec index 113dca9..0fad01b 100644 --- a/packaging/llvm.spec +++ b/packaging/llvm.spec @@ -16,10 +16,15 @@ BuildRequires: python-devel Requires: libllvm = %{version}-%{release} %define install_prefix /usr/local +%define sdk_install_prefix /home/owner/share/tmp/sdk_tools/lldb +%define sdk_bin_dir %{sdk_install_prefix}/bin + %ifarch x86_64 aarch64 %define library_dir %{install_prefix}/lib64 +%define sdk_lib_dir %{sdk_install_prefix}/lib64 %else %define library_dir %{install_prefix}/lib +%define sdk_lib_dir %{sdk_install_prefix}/lib %endif @@ -76,6 +81,18 @@ of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler. +#%package -n lldb-sdk +#Summary: LLDB for SDK +#License: NCSA + + +#%description -n lldb-sdk +#LLDB is a next generation, high-performance debugger. It is built as a set +#of reusable components which highly leverage existing libraries in the +#larger LLVM Project, such as the Clang expression parser and LLVM +#disassembler. + + %package -n lldb-devel Summary: Development header files for LLDB Requires: lldb = %{version}-%{release} @@ -138,6 +155,20 @@ make %{?jobs:-j%jobs} cd build %make_install +# copy lldb for sdk +mkdir -p %{buildroot}%{sdk_bin_dir} +mkdir -p %{buildroot}%{sdk_lib_dir} +mv %{buildroot}%{install_prefix}/bin/lldb %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-3.8.1 %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-argdumper %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-mi %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-mi-3.8.1 %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-server %{buildroot}%{sdk_bin_dir} +mv %{buildroot}%{install_prefix}/bin/lldb-server-3.8.1 %{buildroot}%{sdk_bin_dir} + +cp %{buildroot}%{library_dir}/liblldb.so.3.8.1 %{buildroot}%{sdk_lib_dir}/ +cp -P %{buildroot}%{library_dir}/liblldb.so %{buildroot}%{sdk_lib_dir}/ + rm -rf %{buildroot}/usr/lib/debug/* rm -rf %{buildroot}%{library_dir}/lib*.a @@ -237,22 +268,37 @@ echo Cleaning %{buildroot} %{install_prefix}/include/clang-c/* %ifnarch aarch64 +#%files -n lldb +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{install_prefix}/bin/lldb +#%{install_prefix}/bin/lldb-3.8.1 +#%{install_prefix}/bin/lldb-argdumper +#%{install_prefix}/bin/lldb-mi +#%{install_prefix}/bin/lldb-mi-3.8.1 +#%{install_prefix}/bin/lldb-server +#%{install_prefix}/bin/lldb-server-3.8.1 +#%{library_dir}/liblldb.so +#%{library_dir}/liblldb.so.3.8.1 +#%{library_dir}/python2.7/* + %files -n lldb %manifest %{name}.manifest %defattr(-,root,root,-) -%{install_prefix}/bin/lldb -%{install_prefix}/bin/lldb-3.8.1 -%{install_prefix}/bin/lldb-argdumper -%{install_prefix}/bin/lldb-mi -%{install_prefix}/bin/lldb-mi-3.8.1 -%{install_prefix}/bin/lldb-server -%{install_prefix}/bin/lldb-server-3.8.1 -%{library_dir}/liblldb.so -%{library_dir}/liblldb.so.3.8.1 -#%{library_dir}/python2.7/* +%{sdk_bin_dir}/lldb +%{sdk_bin_dir}/lldb-3.8.1 +%{sdk_bin_dir}/lldb-argdumper +%{sdk_bin_dir}/lldb-mi +%{sdk_bin_dir}/lldb-mi-3.8.1 +%{sdk_bin_dir}/lldb-server +%{sdk_bin_dir}/lldb-server-3.8.1 +%{sdk_lib_dir}/liblldb.so +%{sdk_lib_dir}/liblldb.so.3.8.1 %files -n lldb-devel %manifest %{name}.manifest %defattr(-,root,root,-) %{install_prefix}/include/lldb/* +%{library_dir}/liblldb.so +%{library_dir}/liblldb.so.3.8.1 %endif -- 2.7.4