2019-09-24 09:06:27 +00:00
|
|
|
|
Name: python-pefile
|
2024-12-03 09:54:31 +00:00
|
|
|
|
Version: 2024.8.26
|
2024-12-03 09:51:03 +00:00
|
|
|
|
Release: %autorelease
|
2019-09-24 09:06:27 +00:00
|
|
|
|
Summary: Python module for working with Portable Executable files
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/erocarrera/pefile
|
|
|
|
|
|
|
|
|
|
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%global srcname pefile
|
|
|
|
|
|
|
|
|
|
%global common_desc pefile is a multi-platform Python module to read and work with Portable\
|
|
|
|
|
Executable (aka PE) files. Most of the information in the PE Header is \
|
|
|
|
|
accessible, as well as all the sections, section's information and data.\
|
|
|
|
|
pefile requires some basic understanding of the layout of a PE file. Armed \
|
|
|
|
|
with it it's possible to explore nearly every single feature of the file.\
|
|
|
|
|
Some of the tasks that pefile makes possible are:\
|
|
|
|
|
* Modifying and writing back to the PE image\
|
|
|
|
|
* Header Inspection\
|
|
|
|
|
* Sections analysis\
|
|
|
|
|
* Retrieving data\
|
|
|
|
|
* Warnings for suspicious and malformed values\
|
|
|
|
|
* Packer detection with PEiD’s signatures\
|
|
|
|
|
* PEiD signature generation\
|
|
|
|
|
|
|
|
|
|
|
2021-05-13 21:57:51 +00:00
|
|
|
|
#Source0: https://github.com/erocarrera/%%{srcname}/archive/v%%{version}/%%{srcname}-%%{version}.tar.gz
|
2019-09-24 09:06:27 +00:00
|
|
|
|
Source0: https://github.com/erocarrera/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
|
2024-12-03 09:56:26 +00:00
|
|
|
|
Source1: pefile-tests.sh
|
2009-05-11 15:11:16 +00:00
|
|
|
|
BuildArch: noarch
|
2016-11-01 20:15:16 +00:00
|
|
|
|
|
2021-05-13 21:57:51 +00:00
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
2017-07-25 17:10:32 +00:00
|
|
|
|
|
2016-11-01 20:15:16 +00:00
|
|
|
|
# For the patch
|
2017-05-27 15:55:18 +00:00
|
|
|
|
# BuildRequires: git-core
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
|
|
|
|
%description
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%{common_desc}
|
2013-08-08 01:20:25 +00:00
|
|
|
|
|
2021-05-13 21:57:51 +00:00
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
2016-11-01 18:49:57 +00:00
|
|
|
|
Summary: %{summary}
|
2021-05-13 21:57:51 +00:00
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
2021-05-13 21:57:51 +00:00
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname}
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%{common_desc}
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
2016-11-01 18:49:57 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
2017-05-27 15:55:18 +00:00
|
|
|
|
%autosetup -n %{srcname}-%{version}
|
2016-11-01 20:46:00 +00:00
|
|
|
|
sed -i -e '/^#!\//, 1d' pefile.py
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
|
|
|
|
%build
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%py3_build
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
|
|
|
|
%install
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%py3_install
|
2024-12-03 09:56:26 +00:00
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
|
|
cp %{SOURCE1} %{buildroot}%{_datadir}/%{name}
|
2009-05-11 15:11:16 +00:00
|
|
|
|
|
2023-06-23 03:40:08 +00:00
|
|
|
|
%check
|
|
|
|
|
%py3_check_import pefile peutils ordlookup
|
2019-09-24 09:06:27 +00:00
|
|
|
|
# regression tests in this package are based on binary blob of exe files - commercial and malware
|
|
|
|
|
# at this point (2019-09-20) not suitable to be in Fedora.
|
|
|
|
|
# More info on:
|
|
|
|
|
# https://github.com/erocarrera/pefile/issues/171
|
|
|
|
|
# https://github.com/erocarrera/pefile/issues/82#issuecomment-192018385
|
2021-05-13 21:57:51 +00:00
|
|
|
|
# %%{__python3} setup.py test
|
2016-11-01 18:49:57 +00:00
|
|
|
|
|
2021-05-13 21:57:51 +00:00
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
2016-11-01 18:49:57 +00:00
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python3_sitelib}/*
|
2024-12-03 09:56:26 +00:00
|
|
|
|
%{_datadir}/%{name}
|
2016-11-01 18:49:57 +00:00
|
|
|
|
|
2009-05-11 15:11:16 +00:00
|
|
|
|
%changelog
|
2024-12-03 09:51:03 +00:00
|
|
|
|
%autochangelog
|