Files
python-dfdatetime/python-dfdatetime.spec
Greg Freemyer 550d54cfe3 Accepting request 530947 from home:gregfreemyer:Tools-for-forensic-boot-cd
- update to v0~20170719
	* various improvements including new format support and added sanity checks
- implement python singlespec syntax

OBS-URL: https://build.opensuse.org/request/show/530947
OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-dfdatetime?expand=0&rev=6
2017-10-03 16:49:33 +00:00

64 lines
2.1 KiB
RPMSpec

#
# spec file for package python-dfdatetime
#
# 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
# 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/
#
%define timestamp 20170719
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-dfdatetime
Version: 0~%{timestamp}
Release: 0
Summary: Digital Forensics Date and Time (dfDateTime)
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/log2timeline/dfdatetime
Source: https://github.com/log2timeline/dfdatetime/releases/download/%{timestamp}/dfdatetime-%{timestamp}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(python)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
dfDateTime, or Digital Forensics date and time, provides date and time objects to preserve accuracy and precision.
%prep
%setup -q -n dfdatetime-%{timestamp}
%build
python2 setup.py build
python3 setup.py build
%install
python2 setup.py install -O1 --root=%{buildroot}
python3 setup.py install -O1 --root=%{buildroot}
#delete all precombied PYO files
find %{buildroot} -name \*.pyc -delete
find %{buildroot} -name \*.pyo -delete
# these are installed into the wrong place
rm -rf %{buildroot}/usr/share/doc/dfdatetime
%fdupes %{buildroot}/%{_prefix}
%files %{python_files}
%defattr(-,root,root)
%doc ACKNOWLEDGEMENTS AUTHORS README LICENSE
%{python_sitelib}/dfdatetime*
%changelog