diff --git a/python-evtx.changes b/python-evtx.changes index a20f880..18e3822 100644 --- a/python-evtx.changes +++ b/python-evtx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 24 13:38:32 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Wed May 3 11:56:57 UTC 2017 - cbosdonnat@suse.com diff --git a/python-evtx.spec b/python-evtx.spec index 11326c3..7e35b90 100644 --- a/python-evtx.spec +++ b/python-evtx.spec @@ -1,7 +1,7 @@ # # spec file for package python-evtx # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -16,23 +16,26 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-evtx Version: 0.5.3b Release: 0 Summary: Windows Event Log files parser License: Apache-2.0 -Group: Development/Libraries/Python +Group: Development/Libraries/Python Url: https://github.com/williballenthin/%{name} Source: https://github.com/williballenthin/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: dos2unix +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1110 BuildArch: noarch +%py_requires %endif -%endif +%python_subpackages %description python-evtx is a pure Python parser for recent Windows Event Log files (those @@ -47,21 +50,24 @@ inspired by the work of Andreas Schuster and his Perl implementation %setup -q %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install mkdir -p %{buildroot}%{_bindir} for script in evtxdump.py evtxinfo.py; do - sed -i -e 's:^#!/bin/python:#!/usr/bin/python:' scripts/$script + sed -i -e 's:^#!/usr/bin/env python:#!%{__python3}:' scripts/$script + dos2unix scripts/$script install -m 0755 scripts/$script %{buildroot}%{_bindir}/$script done -%files +%fdupes %{buildroot} + +%files %{python_files} %defattr(-,root,root) %doc LICENSE.TXT README.md %{python_sitelib}/* -%{_bindir}/evtxdump.py -%{_bindir}/evtxinfo.py +%python3_only %{_bindir}/evtxdump.py +%python3_only %{_bindir}/evtxinfo.py %changelog