Skip to content

Commit

Permalink
SPEC file updated to version 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xambroz authored and radare committed Oct 25, 2015
1 parent d2aa2c4 commit e4cf5bd
Showing 1 changed file with 74 additions and 29 deletions.
103 changes: 74 additions & 29 deletions radare2.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
%global gituser radare
%global gitname radare2
#global commit a093958b6d24015d82782eb20a2e10d8f4afcd85
%global commit 5a3dab0a86e1452c0bb0c13d869f95b41f50b9a9
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name: radare2
Version: 0.9.8rc3
Release: 0%{?dist}
Summary: %{name} reverse engineering framework
Version: 0.10.0
Release: 1%{?dist}
Summary: The %{name} reverse engineering framework
Group: Applications/Engineering
License: GPLv3+
URL: http://www.radare.org
Source0: https://github.com/radare/%{name}/archive/%{name}-%{version}.tar.gz
License: LGPLv3
URL: http://radare.org/
#Source0: http://radare.org/get/%{name}-%{version}.tar.gz
#Source0: http://radare.org/get/%{name}-%{version}.tar.xz
Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz


BuildRequires: file-devel
Requires: %{name}-devel
BuildRequires: libzip-devel
#BuildRequires: capstone-devel >= 3.0.4

#Assume more versions installed in paraller side-by-side
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

%description
Expand All @@ -18,52 +30,85 @@ editor, wrapped I/O, file system support, debugger support, diffing
between two functions or binaries, and code analysis at opcode,
basic block, and function levels.

%package devel

%package devel
Summary: Development files for the %{name} package
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
%description devel
Development files for the %{name} package. See %{name} package for more
information.
information.


%prep
%setup -q -n %{name}-%{version}
#%setup -q -n %{name}-%{version}
%setup -q -n %{gitname}-%{commit}

# oops :)
sed -i "s/PKGNAME='radare2' ; VERSION='.*' ;/PKGNAME='radare2' ; VERSION='%{version}' ;/" `dirname %{SOURCE0}`/%{name}-%{version}/configure

# Use system libmagic rather than bundled
%build
%configure --with-sysmagic --with-syscapstone

#The make fails if _smp_mflags passed on command line
CFLAGS="%{optflags} -fPIC -I. -Iinclude -I../include" make
%configure --with-sysmagic --with-syszip #--with-syscapstone
CFLAGS="%{optflags} -fPIC -I../include" make %{?_smp_mflags} LIBDIR=%{_libdir} PREFIX=%{_prefix} DATADIR=%{DATADIR}

# Do not run the testsuite yet
# %check
# make tests


%install
make install DESTDIR="%{buildroot}"
chmod 0755 %{buildroot}/%{_libdir}/%{name}/%{version}/*
rm -rf %{buildroot}
NOSUDO=1 make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} PREFIX=%{_prefix}
cp shlr/sdb/src/libsdb.a %{buildroot}/%{_libdir}/libsdb.a

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


%files
%doc %{_datadir}/doc/%{name}
%doc COPYING
%doc AUTHORS.md CONTRIBUTING.md DEVELOPERS.md README.md TODO.md
%license COPYING
%{_bindir}/r*
%{_libdir}/libr*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{version}-git
%{_libdir}/%{name}/last
%{_libdir}/%{name}/%{version}-git/*.so
#%{_libdir}/%{name}/%{version}-git/*.py*
#%{_libdir}/%{name}/%{version}-git/*.lua
#%{_libdir}/%{name}/%{version}-git/*.rb
%{_libdir}/%{name}/%{version}-git/hud
%{_libdir}/%{name}/%{version}-git/syscall
%{_libdir}/%{name}/%{version}-git/opcodes
%dir %{_prefix}/lib/%{name}
%dir %{_prefix}/lib/%{name}/%{version}-git
%dir %{_prefix}/lib/%{name}/%{version}-git/magic
%{_prefix}/lib/%{name}/%{version}-git/magic/*
%{_mandir}/man1/r*.1.*
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/%{version}-git
%dir %{_datadir}/%{name}/%{version}-git/cons
%{_datadir}/%{name}/%{version}-git/cons/*
%dir %{_datadir}/%{name}/%{version}-git/format
%{_datadir}/%{name}/%{version}-git/format/*
%dir %{_prefix}/%{name}/%{version}-git/r2pm
%{_prefix}/%{name}/%{version}-git/r2pm/*
%dir %{_datadir}/%{name}/%{version}-git/www
%{_datadir}/%{name}/%{version}-git/www/*

%files devel
%{_includedir}/libr/

%files devel
%{_includedir}/libr
%{_libdir}/libsdb.a
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}/%{version}/
%{_libdir}/libr*
%{_exec_prefix}/lib/%{name}/%{version}/magic/
%{_libdir}/%{name}/last
%{_datarootdir}/%{name}/%{version}/

%post -n %{name}-devel -p /sbin/ldconfig
%postun -n %{name}-devel -p /sbin/ldconfig


%changelog
* Sat Oct 10 2015 Michal Ambroz <rebus at, seznam.cz> 0.10.0-1
- build for Fedora for alpha of 0.10.0

* Sun Nov 09 2014 Pavel Odvody <podvody@redhat.com> 0.9.8rc3-0
- Initial tito package

0 comments on commit e4cf5bd

Please sign in to comment.