Blob Blame History Raw
Name:		lldb
Version:	3.7.1
Release:	1%{?dist}
Summary:	Next generation high-performance debugger

License:	NCSA

BuildRequires:	cmake
BuildRequires:  llvm-devel = %{version}
BuildRequires:  clang-devel = %{version}
BuildRequires:	libedit-devel
BuildRequires:  swig

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

%package devel
Summary:	Development header files for LLDB
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description devel
The package contains header files for the LLDB debugger.

%package -n python-lldb
Summary:	Python module for LLDB
BuildRequires:	python2-devel

%description -n python-lldb
The package contains the LLDB Python module.

%setup -q -n %{name}-%{version}.src

mkdir -p _build
cd _build

# Python version detection is broken

LDFLAGS="%{__global_ldflags} -lpthread -ldl"

CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fno-strict-aliasing"

%cmake .. \
	-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
	-DPYTHON_VERSION_MAJOR:STRING=$(%{__python} -c "import sys; print sys.version_info.major") \
	-DPYTHON_VERSION_MINOR:STRING=$(%{__python} -c "import sys; print sys.version_info.minor")

make %{?_smp_mflags}

cd _build
make install DESTDIR=%{buildroot}

# remove static libraries
rm -fv %{buildroot}%{_libdir}/*.a

# python: fix binary libraries location
liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/
ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/
mv -v %{buildroot}%{python_sitearch}/ %{buildroot}%{python_sitearch}/lldb/
rm -v %{buildroot}%{python_sitearch}/lib

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files devel

%files -n python-lldb

* Tue Oct 06 2015 Jan Vcelak <> 3.7.0-100
- initial version using cmake build system