%global commitdate 20140326 %global commit 8838756be2736695311440073d9f0b498df1fc24 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())") Name: python-evtx Version: 0.3.2 Release: 0.1.%{commitdate}git%{shortcommit} Summary: Windows Event Log parsing library and tools License: ASL 2.0 URL: http://www.williballenthin.com/evtx/ Source0: https://github.com/williballenthin/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildArch: noarch # Not compatible with Python 3. BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: epydoc %description %{name} is a pure Python parser for recent Windows Event Log files (those with the file extension ".evtx"). The module provides programmatic access to the File and Chunk headers, record templates, and event entries. For example, you can use %{name} to review the event logs of Windows 7 systems from a Mac or Linux workstation. Note this only works for Windows >= Vista. %package doc Summary: Programming documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc %{name} is a pure Python parser for recent Windows Event Log files (those with the file extension ".evtx"). The module provides programmatic access to the File and Chunk headers, record templates, and event entries. For example, you can use %{name} to review the event logs of Windows 7 systems from a Mac or Linux workstation. Note this only works for Windows >= Vista. This package contains programming documentation for %{name}. %prep %setup -q -n %{name}-%{commit} # Remove #! line from libraries. find Evtx -name '*.py' | xargs sed -i '/^#!.*\/python/d' %build python setup.py build bash make_documentation.sh %install python setup.py install --skip-build --root %{buildroot} # The scripts are not installed automatically, so copy some of # them to bindir: mkdir -p %{buildroot}%{_bindir} install -m 0755 \ scripts/evtxdump.py \ scripts/evtxinfo.py \ %{buildroot}%{_bindir} %files %doc CHANGELOG.TXT CONTRIBUTORS.TXT LICENSE.TXT README.md %{python_sitelib}/* %{_bindir}/*.py %files doc %doc documentation/html %changelog * Thu Oct 23 2014 - Richard W.M. Jones - 0.3.2-0.1.20140326git8838756 - Initial Fedora package.