forked from pool/binwalk
Dirk Mueller
dd56025b4a
Firmware Analysis Tool OBS-URL: https://build.opensuse.org/request/show/79901 OBS-URL: https://build.opensuse.org/package/show/devel:tools/binwalk?expand=0&rev=1
78 lines
2.7 KiB
RPMSpec
78 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: binwalk
|
|
Version: 0.3.8
|
|
Release: 0
|
|
License: MIT
|
|
Summary: Firmware Analysis Tool
|
|
Url: http://code.google.com/p/binwalk/
|
|
Group: Development/Tools/Debuggers
|
|
# Real source http://binwalk.googlecode.com/files/{name}-{version}.tar.gz
|
|
Source: %{name}-%{version}.tar.bz2
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: help2man
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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
|
|
cd src
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
# used for older versions of help2man - read SLE...
|
|
%if 0%{?sles_version}
|
|
cp binwalk binwalk.bin; echo '#!/bin/sh' > binwalk.sh;echo './binwalk.bin $* 2>&1' >> binwalk.sh; chmod 755 binwalk.sh; help2man -N --help-option="-h" --version-option="-h" ./binwalk.sh |sed -e 's/binwalk.bin/binwalk/g' |gzip -9 - > binwalk.1.gz
|
|
%else
|
|
help2man --no-discard-stderr --help-option="-h" --version-option="-h" ./binwalk |gzip -9 - > binwalk.1.gz
|
|
%endif
|
|
|
|
%install
|
|
cd src
|
|
make install DESTDIR=%{buildroot}
|
|
install -p -D -m 0644 binwalk.1.gz %{buildroot}/%{_mandir}/man1/binwalk.1.gz
|
|
# I really do not know why it likes this...
|
|
rm %{buildroot}/%{_sysconfdir}/binwalk/magic.o
|
|
%clean
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc docs/README
|
|
%dir %{_sysconfdir}/binwalk/
|
|
%config %{_sysconfdir}/binwalk/magic.binarch
|
|
%config %{_sysconfdir}/binwalk/magic.bincast
|
|
%config %{_sysconfdir}/binwalk/magic.binwalk
|
|
%{_bindir}/binwalk
|
|
%{_mandir}/man1/binwalk.1.gz
|
|
|
|
%changelog
|
|
|