File radar2.spec of Package radare2

%global radare2_version 2.6.0
%global radare2_release 1
%define pkgname radare2

%define debug_package %{nil}

Name:           %{pkgname}
Version:        %{radare2_version}
Release:        %{radare2_release}
Summary:        Radare is a portable reversing framework


License: GPLv3
Group: Development/Languages
Source0: %{pkgname}-%{version}.tar.gz
URL: http://rr-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: radare.conf

BuildRequires: gcc gcc-c++ cmake git

%description
Radare is a portable reversing framework

%prep
%setup -q

%build
./configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d/
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/ld.so.conf.d/

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/usr/local/bin/r2
/usr/local/bin/r2agent
/usr/local/bin/r2pm
/usr/local/bin/rabin2
/usr/local/bin/radare2
/usr/local/bin/radiff2
/usr/local/bin/rafind2
/usr/local/bin/ragg2
/usr/local/bin/rahash2
/usr/local/bin/rarun2
/usr/local/bin/rasm2
/usr/local/bin/rax2
/usr/local/include/libr/*
/usr/local/lib/*
/usr/local/share/doc/radare2/*
/usr/local/share/man/man1/*
/usr/local/share/radare2/*
/etc/ld.so.conf.d/*
/usr/local/lib/.%{radare2_version}
/usr/local/share/man/man7/esil.7
#/usr/src/debug/*
#/usr/lib/debug/*
#/usr/lib/debug/.build-id/*
#/usr/lib/debug/.dwz/*


%changelog
* Thu May 24 2018 Alexey Berezhok <bayrepo.info@gmail.com> 2.6.0-1
- Initial package