SHA256
1
0
forked from pool/binwalk
binwalk/binwalk.spec

92 lines
2.6 KiB
RPMSpec

#
# spec file for package binwalk
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: binwalk
Version: 2.0.1
Release: 0
Summary: Firmware Analysis Tool
License: MIT
Group: Development/Tools/Debuggers
Url: https://github.com/devttys0/binwalk
Source: https://github.com/devttys0/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Depends on libmagic.
Requires: file
Recommends: bzip2
Recommends: cabextract
Recommends: cpio
Recommends: gzip
Recommends: p7zip
Recommends: unrar
Recommends: xz
Recommends: zlib
Suggests: java
%if 0%{?suse_version} >= 1230
BuildRequires: python3-devel
Requires: python3-curses
# Depends on libfuzzy.
Requires: ssdeep
%else
BuildRequires: python-devel
Requires: python-argparse
Requires: python-curses
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%description
Binwalk is a tool for searching a given binary image for embedded
files and executable code. Specifically, it is designed for
identifying files and code embedded inside of firmware images.
Binwalk uses the libmagic library, so it is compatible with magic
signatures created for the Unix file utility. Binwalk also includes
a custom magic signature file which contains improved signatures
for files that are commonly found in firmware images such as
compressed/archived files, firmware headers, Linux kernels,
bootloaders, filesystems, etc.
%prep
%setup -q
%build
%configure \
%if 0%{?suse_version} >= 1230
--with-python=python3 \
--disable-libfuzzy \
%endif
--disable-libmagic
make %{?_smp_mflags}
%install
%if 0%{?suse_version} >= 1230
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix}
%else
python2 setup.py install --root=%{buildroot} --prefix=%{_prefix}
%endif
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%if 0%{?suse_version} >= 1230
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}-*
%else
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-*
%endif
%changelog