2011-09-06 08:29:59 +02:00
|
|
|
#
|
2014-08-12 13:44:20 +02:00
|
|
|
# spec file for package binwalk
|
2011-09-06 08:29:59 +02:00
|
|
|
#
|
2015-07-01 16:12:52 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-09-06 08:29:59 +02:00
|
|
|
#
|
|
|
|
# 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
|
2014-08-12 13:44:20 +02:00
|
|
|
Version: 2.0.1
|
2011-09-06 08:29:59 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Firmware Analysis Tool
|
2014-08-12 13:44:20 +02:00
|
|
|
License: MIT
|
2011-09-06 08:29:59 +02:00
|
|
|
Group: Development/Tools/Debuggers
|
2014-08-12 13:44:20 +02:00
|
|
|
Url: https://github.com/devttys0/binwalk
|
|
|
|
Source0: https://github.com/devttys0/binwalk/archive/v%{version}/binwalk-%{version}.tar.gz
|
|
|
|
Source1: binwalk.1
|
|
|
|
BuildRequires: file-devel
|
|
|
|
BuildRequires: python-devel
|
2013-09-24 11:06:17 +02:00
|
|
|
BuildRequires: python-magic
|
2014-08-12 13:44:20 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
BuildRequires: libfuzzy-devel
|
|
|
|
%endif
|
|
|
|
# Required by help2man
|
|
|
|
BuildRequires: python-curses
|
|
|
|
BuildRequires: help2man
|
2015-07-01 16:12:52 +02:00
|
|
|
Requires: python-curses
|
2013-09-24 11:06:17 +02:00
|
|
|
Requires: python-magic
|
2014-08-12 13:44:20 +02:00
|
|
|
Requires: python-pyqtgraph
|
|
|
|
Requires: python-scipy
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
Requires: libfuzzy2
|
|
|
|
%endif
|
|
|
|
# sle requires it...
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2011-09-06 08:29:59 +02:00
|
|
|
|
|
|
|
%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
|
2014-08-12 13:44:20 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%configure --disable-bundles
|
|
|
|
%else
|
|
|
|
%configure --disable-libmagic --disable-pyqtgraph
|
|
|
|
%endif
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
2013-09-24 11:06:17 +02:00
|
|
|
%{__python} setup.py build
|
2014-08-12 13:44:20 +02:00
|
|
|
%if 0%{?suse_version} >= 1140
|
|
|
|
%{__python} setup.py install --prefix=%{_prefix} --root=$(pwd)/h2m
|
|
|
|
echo |PYTHONPATH=./h2m/%{_prefix}/%{python_sitelib} help2man -N --version-string=%{version} ./h2m/%{_prefix}/bin/binwalk > binwalk.1
|
|
|
|
rm -rf h2m
|
|
|
|
%else
|
|
|
|
sed -e 's/VERSION_STRING/%{version}/g' %{S:1} > binwalk.1
|
|
|
|
%endif
|
2011-09-06 08:29:59 +02:00
|
|
|
|
|
|
|
%install
|
2013-09-24 11:06:17 +02:00
|
|
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2014-08-12 13:44:20 +02:00
|
|
|
install -Dm0644 binwalk.1 %{buildroot}%{_mandir}/man1/binwalk.1
|
2011-09-06 08:29:59 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2013-09-24 11:06:17 +02:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{python_sitelib}/%{name}/
|
2014-08-12 13:44:20 +02:00
|
|
|
%{python_sitelib}/binwalk-*-py%{py_ver}.egg-info
|
|
|
|
%{_mandir}/man1/binwalk.1*
|
2011-09-06 08:29:59 +02:00
|
|
|
%changelog
|