File python-oletools.spec of Package python-oletools
#
# spec file for package python-oletools
#
# Copyright (c) 2019 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/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-oletools
Version: 0.54.2.post1
Release: 0
License: BSD (FIXME:No SPDX)
Summary: Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response #DFIR
Url: http://www.decalage.info/python/oletools
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/o/oletools/oletools-%{version}.zip
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module colorclass}
BuildRequires: %{python_module easygui}
BuildRequires: %{python_module msoffcrypto-tool}
BuildRequires: %{python_module olefile >= 0.46}
BuildRequires: %{python_module pyparsing >= 2.2.0}
BuildRequires: %{python_module pcodedmp >= 1.2.5}
# /SECTION
BuildRequires: unzip
BuildRequires: fdupes
Requires: python-colorclass
Requires: python-easygui
Requires: python-msoffcrypto-tool
Requires: python-olefile >= 0.46
Requires: python-pyparsing >= 2.2.0
Requires: python-pcodedmp >= 1.2.5
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response #DFIR
%prep
%setup -q -n oletools-master
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/oletools
# bin scripts *3 are deprecated, for backwards compatibility only.
%{python_expand rm %{buildroot}%{_bindir}/mraptor3 %{buildroot}%{_bindir}/olevba3
%fdupes %{buildroot}%{$python_sitelib}
}
%check
export LANG=en_US.utf-8
%python_exec setup.py test
%post
%python_install_alternative oletools
%postun
%python_uninstall_alternative oletools
%files %{python_files}
%doc README.md
%python_alternative %{_bindir}/ezhexviewer
%python_alternative %{_bindir}/mraptor
#%%python_alternative %{_bindir}/mraptor3
%python_alternative %{_bindir}/olebrowse
%python_alternative %{_bindir}/oledir
%python_alternative %{_bindir}/oleid
%python_alternative %{_bindir}/olemap
%python_alternative %{_bindir}/olemeta
%python_alternative %{_bindir}/oletimes
%python_alternative %{_bindir}/olevba
#%%python_alternative %{_bindir}/olevba3
%python_alternative %{_bindir}/pyxswf
%python_alternative %{_bindir}/rtfobj
%python_alternative %{_bindir}/oleobj
%python_alternative %{_bindir}/msodde
%python_alternative %{_bindir}/olefile
%{python_sitelib}/*
%changelog