%global pypi_name pypykatz
Name: %{pypi_name}
Version: 0.0.7
Release: 1%{?dist}
Summary: A Python implementation of Mimikatz
License: MIT
URL: https://github.com/skelsec/pypykatz
Source0: %pypi_source
Source1: https://raw.githubusercontent.com/skelsec/pypykatz/master/LICENSE
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description
Mimikatz implementation in pure Python. It's optimized for offline parsing,
but has options for live credential dumping as well.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove shebangs
find ./ -type f -name "*.py" -exec sed -i '/^#!\//, 1d' {} \;
# Add LICENSE file
cp -a %{SOURCE1} LICENSE
# Fix line endings
sed -i "s|\r||g" README.md
%build
%py3_build
%install
%py3_install
%files
%doc README.md
%license LICENSE
%{_bindir}/*
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}*.egg-info
%changelog
* Sat Jun 15 2019 Fabian Affolter <mail@fabian-affolter.ch> - 0.0.7-1
- Initial package for Fedora