Blob Blame History Raw
Name:           rizin
Summary:        UNIX-like reverse engineering framework and command-line tool-set
Version:        0.2.0

%global         gituser         rizinorg
%global         gitname         rizin
%global         rel             2

Release:        %{rel}%{?dist}

# This patch is required to avoid exporting symbols of subprojects
# See
Patch1:         rizin-avoid-symbols-clashing.patch

License:        LGPLv3+ and GPLv2+ and BSD and MIT and ASL 2.0 and MPLv2.0 and zlib
# Rizin as a package is targeting to be licensed/compiled as LGPLv3+
# however during build for Fedora the GPL code is not omitted so effectively it
# is GPLv2+.
# Some code has originally different license:
# librz/asm/arch/ - GPLv2+, MIT, GPLv3
# librz/bin/format/pe/dotnet - Apache License Version 2.0
# librz/util/qrcode.c - MIT
# shlr/java - Apache 2.0
# shlr/sdb/src - MIT
# shlr/lz4 - 3 clause BSD (system installed shared lz4 is used instead)
# shlr/spp - MIT
# shlr/tcc - LGPLv2+
# shlr/udis86 - 2 clause BSD
# shlr/spp - MIT

BuildRequires:  gcc
BuildRequires:  meson
BuildRequires:  ninja-build
BuildRequires:  file-devel
BuildRequires:  xxhash-devel
BuildRequires:  pkgconfig

BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(libzip)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(liblz4)
BuildRequires:  pkgconfig(capstone) >= 3.0.4
BuildRequires:  pkgconfig(libuv)
BuildRequires:  pkgconfig(openssl)

Requires:       %{name}-common = %{version}-%{release}

# Package contains several bundled libraries that are used in Fedora builds

# ./shlr/spp/
# SPP stands for Simple Pre-Processor, a templating language.
Provides:       bundled(spp) = 1.2.0

# ./shlr/sdb/
# sdb is a simple string key/value database based on djb's cdb
Provides:       bundled(sdb) = 248f8950580ef344430603d408a08b4fd6664744

# ./shlr/sdb/src/json/README
# JSON support for sdb
Provides:       bundled(js0n)

# librz/util/regex/README
# Modified OpenBSD regex to be portable
# cvs -qd get -P src/lib/libc/regex
# version from 2010/11/21 00:02:30, version of files ranges from v1.11 to v1.20
Provides:       bundled(openbsdregex) = 1.11

# ./shlr/tcc/
# This is a stripped down version of tcc without the code generators and heavily modified.
Provides:       bundled(tcc) = 0.9.26

# ./librz/asm/arch/tricore/
# Based on code from
# part of binutils to read machine code for Tricore architecture
# ./librz/asm/arch/ppc/gnu/
# part of binutils to read machine code for ppc architecture
# ./librz/asm/arch/arm/gnu/
Provides:       bundled(binutils) = 2.13

# ./librz/asm/arch/avr/README
# * This code has been ripped from vavrdisasm 1.6
Provides:       bundled(vavrdisasm) = 1.6

Rizin is a free and open-source Reverse Engineering framework, providing a
complete binary analysis experience with features like Disassembler,
Hexadecimal editor, Emulation, Binary inspection, Debugger, and more.

Rizin is a fork of radare2 with a focus on usability, working features and code

%package devel
Summary:        Development files for the rizin package
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       file-devel
Requires:       openssl-devel

%description devel
Development files for the rizin package. See rizin package for more

%package common
Summary:        Arch-independent SDB files for the rizin package
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description common
Arch-independent SDB files used by rizin package. See rizin package for more

# Build from git release version
%setup -n %{gitname}-v%{version}
%patch1 -p1

# Whereever possible use the system-wide libraries instead of bundles
%meson \
    -Duse_sys_magic=enabled \
    -Duse_sys_libzip=enabled \
    -Duse_sys_zlib=enabled \
    -Duse_sys_lz4=enabled \
    -Duse_sys_xxhash=enabled \
    -Duse_sys_openssl=enabled \
    -Duse_sys_libuv=enabled \
    -Duse_sys_capstone=enabled \
%ifarch s390x
    -Ddebugger=false \
    -Denable_tests=false \
    -Denable_rz_test=false \
    -Dlocal=disabled \
    -Dpackager="Fedora" \


# Do not run the unit testsuite yet - it pulls another big repository
# from github


%files devel

%files common
%dir %{_datadir}/%{name}
%dir %{_datadir}/doc/%{name}
%dir %{_datadir}/%{name}/%{version}

* Tue Apr 20 2021 Riccardo Schirone <> - 0.2.0-2
- Apply patch to avoid symbols collision

* Mon Apr 12 2021 Riccardo Schirone <> - 0.2.0-1
- Rebase to upstream version 0.2.0

* Tue Mar 30 2021 Riccardo Schirone <> - 0.1.2-1
- Initial SPEC file