d82f9f
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
d82f9f
%{!?python_ver: %global python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
d82f9f
d82f9f
Summary: Python module to access DMI data
d82f9f
Name: python-dmidecode
d82f9f
Version: 3.12.2
d82f9f
Release: 4%{?dist}
d82f9f
License: GPLv2
d82f9f
Group: System Environment/Libraries
d82f9f
URL: https://github.com/nima/python-dmidecode/
d82f9f
Source0: %{name}-%{version}.tar.xz
d82f9f
Source1: generate-tarball.sh
d82f9f
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
d82f9f
Requires: libxml2-python
d82f9f
BuildRequires: libxml2-python
d82f9f
BuildRequires: libxml2-devel
d82f9f
BuildRequires: python-devel
d82f9f
ExcludeArch: s390x
d82f9f
d82f9f
Patch0: disable-old-smbios-warning.patch
d82f9f
Patch1: revert-interface-changes.patch
d82f9f
Patch2: disable_loading_dmidecodemodule_on_non_x86_64.patch
d82f9f
d82f9f
%description
d82f9f
python-dmidecode is a python extension module that uses the
d82f9f
code-base of the 'dmidecode' utility, and presents the data
d82f9f
as python data structures or as XML data using libxml2.
d82f9f
d82f9f
%prep
d82f9f
%setup -q
d82f9f
%patch0 -p1
d82f9f
%patch1 -p1
d82f9f
%patch2 -p1
d82f9f
d82f9f
%build
d82f9f
make build
d82f9f
cd unit-tests
d82f9f
make
d82f9f
cd ..
d82f9f
d82f9f
%install
d82f9f
rm -rf $RPM_BUILD_ROOT
d82f9f
python src/setup.py install --root $RPM_BUILD_ROOT --prefix=%{_prefix}
d82f9f
d82f9f
%clean
d82f9f
rm -rf $RPM_BUILD_ROOT
d82f9f
d82f9f
d82f9f
%files
d82f9f
%defattr(-,root,root,-)
d82f9f
%doc README doc/README.upstream doc/LICENSE doc/AUTHORS doc/AUTHORS.upstream
d82f9f
%{python_sitearch}/dmidecodemod.so
d82f9f
%{python_sitearch}/dmidecode.py
d82f9f
%{python_sitearch}/dmidecode.py[co]
d82f9f
%if "%{python_ver}" >= "2.5"
d82f9f
%{python_sitearch}/*.egg-info
d82f9f
%endif
d82f9f
%{_datadir}/python-dmidecode/
d82f9f
d82f9f
%changelog
d82f9f
* Fri Aug 02 2019 Lianbo Jiang <lijiang@redhat.com> - 3.12.2-4
d82f9f
- Disable loading the dmidecodemodule on non-x86_64
d82f9f
- Resolves: #1688725
d82f9f
d82f9f
* Sun Jul 22 2018 Lianbo Jiang <lijiang@redhat.com> - 3.12.2-3
d82f9f
- Modified upstream URL reference
d82f9f
- Resolves: #1583926
d82f9f
d82f9f
* Sun Jul 22 2018 Lianbo Jiang <lijiang@redhat.com> - 3.12.2-3
d82f9f
- Disable build for s390x
d82f9f
- Resolves: #1509936
d82f9f
d82f9f
* Mon Nov 6 2017 Petr Oros <poros@redhat.com> - 3.12.2-2
d82f9f
- Revert interface changes
d82f9f
- Resolves: #1504033
d82f9f
d82f9f
* Mon Mar 13 2017 Petr Oros <poros@redhat.com> - 3.12.2-1
d82f9f
- Update to new release
d82f9f
- Resolves: #1431548
d82f9f
d82f9f
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.10.13-11
d82f9f
- Mass rebuild 2014-01-24
d82f9f
d82f9f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.10.13-10
d82f9f
- Mass rebuild 2013-12-27
d82f9f
d82f9f
* Mon Jun 20 2013 Ales Ledvinka <aledvink@redhat.com> - 3.10.13-9
d82f9f
- Attribute installed may appear as duplicate and cause invalid XML.
d82f9f
d82f9f
* Mon Jun 17 2013 Ales Ledvinka <aledvink@redhat.com> - 3.10.13-8
d82f9f
- Attribute dmispec may cause invalid XML on some hardware.
d82f9f
- Signal handler for SIGILL.
d82f9f
d82f9f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.13-7
d82f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d82f9f
d82f9f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.13-6
d82f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d82f9f
d82f9f
* Thu Jul 19 2012 Ales Ledvinka <aledvink@redhat.com> 3.10.14-5
d82f9f
- Upstream relocated. Document source tag and tarball generation.
d82f9f
d82f9f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.13-4
d82f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d82f9f
d82f9f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.13-3
d82f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d82f9f
d82f9f
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.10.13-2
d82f9f
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
d82f9f
d82f9f
* Tue Jun 15 2010 Roman Rakus <rrakus@redhat.com> - 3.10.13-1
d82f9f
- Update to new release
d82f9f
d82f9f
* Fri Mar 12 2010 Nima Talebi <nima@it.net.au> - 3.10.12-1
d82f9f
- Update to new release
d82f9f
d82f9f
* Tue Feb 16 2010 Nima Talebi <nima@it.net.au> - 3.10.11-1
d82f9f
- Update to new release
d82f9f
d82f9f
* Tue Jan 12 2010 Nima Talebi <nima@it.net.au> - 3.10.10-1
d82f9f
- Update to new release
d82f9f
d82f9f
* Thu Jan 07 2010 Nima Talebi <nima@it.net.au> - 3.10.9-1
d82f9f
- Update to new release
d82f9f
d82f9f
d82f9f
* Thu Dec 15 2009 Nima Talebi <nima@it.net.au> - 3.10.8-1
d82f9f
- New Upstream release.
d82f9f
- Big-endian and little-endian approved.
d82f9f
- Packaged unit-test to tarball.
d82f9f
- Rewritten unit-test to be able to run as non-root user, where it will not
d82f9f
  try to read /dev/mem.
d82f9f
- Added two dmidump data files to the unit-test.
d82f9f
d82f9f
* Thu Nov 26 2009 David Sommerseth <davids@redhat.com> - 3.10.7-3
d82f9f
- Fixed even more .spec file issues and removed explicit mentioning
d82f9f
  of /usr/share/python-dmidecode/pymap.xml
d82f9f
d82f9f
* Wed Nov 25 2009 David Sommerseth <davids@redhat.com> - 3.10.7-2
d82f9f
- Fixed some .spec file issues (proper Requires, use _datadir macro)
d82f9f
d82f9f
* Wed Sep 23 2009 Nima Talebi <nima@it.net.au> - 3.10.7-1
d82f9f
- Updated source0 to new 3.10.7 tar ball
d82f9f
d82f9f
* Wed Jul 13 2009 David Sommerseth <davids@redhat.com> - 3.10.6-6
d82f9f
- Only build the python-dmidecode module, not everything
d82f9f
d82f9f
* Wed Jul 13 2009 David Sommerseth <davids@redhat.com> - 3.10.6-5
d82f9f
- Added missing BuildRequres for libxml2-python
d82f9f
d82f9f
* Wed Jul 13 2009 David Sommerseth <davids@redhat.com> - 3.10.6-4
d82f9f
- Added missing BuildRequres for python-devel
d82f9f
d82f9f
* Wed Jul 13 2009 David Sommerseth <davids@redhat.com> - 3.10.6-3
d82f9f
- Added missing BuildRequres for libxml2-devel
d82f9f
d82f9f
* Wed Jul 13 2009 David Sommerseth <davids@redhat.com> - 3.10.6-2
d82f9f
- Updated release, to avoid build conflict
d82f9f
d82f9f
* Wed Jun 10 2009 David Sommerseth <davids@redhat.com> - 3.10.6-1
d82f9f
- Updated to work with the new XML based python-dmidecode
d82f9f
d82f9f
* Sat Mar  7 2009 Clark Williams <williams@redhat.com> - 2.10.3-1
d82f9f
- Initial build.
d82f9f