Summary:        Tool to analyse BIOS DMI data.
Summary(ja):	BIOS DMI データを表示するツール
Name:           dmidecode
Version:        3.2
Release:        1%{?_dist_release}
Group:          System Environment/Base
License:        GPL
URL:            http://www.nongnu.org/dmidecode/
Source0:        http://download.savannah.gnu.org/releases/dmidecode/dmidecode-%{version}.tar.xz
Patch0:         0001-dmidecode-Fix-Redfish-Hostname-print-length.patch
Patch1:         0002-dmidecode-Don-t-use-memcpy-on-dev-mem-on-arm64.patch
Patch2:         0003-dmidecode-Use-the-most-appropriate-unit-for-cache-si.patch
Patch3:         0004-dmidecode-Use-dmi_cache_size_2-in-dmi_cache_size.patch
Patch4:         0005-dmidecode-Add-Logical-non-volatile-device-to-the-mem.patch
Patch5:         0006-dmidecode-Reformat-the-FILES-section-of-the-manual-p.patch
Patch6:         0007-dmidecode-Document-how-the-UUID-fields-are-interpret.patch
Patch7:         0008-Use-comments-to-separate-sections-in-manual-pages.patch
Patch8:         0009-dmidecode-Add-missing-standard-include.patch
Patch9:         0010-dmidecode-Only-scan-dev-mem-for-entry-point-on-x86.patch
Patch10:        0011-Use-larger-units-for-memory-device-and-BIOS-size.patch
Patch11:        0012-Fix-formatting-of-TPM-table-output.patch
Patch12:        0013-dmidecode-Adding-bios-revision-to-s-option.patch
Patch13:        0014-dmidecode-Adding-firmware-revision-support-to-s-opti.patch
Patch14:        0015-dmidecode-Fix-System-Slot-Information-for-PCIe-SSD.patch
Patch15:        0016-Typo.patch
Patch16:        0017-dmidecode-Add-enumerated-values-from-SMBIOS-3.3.0.patch
Patch17:        0018-dmidecode-Decode-system-slot-base-bus-width-and-peer.patch


Buildroot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires: 	automake, autoconf
ExclusiveArch:	%{ix86} x86_64 ia64
Obsoletes:	kernel-utils

Vendor: Project Vine
Distribution: Vine Linux
Packager: shaolin, daisuke


%description
dmidecode reports information about x86 & ia64 hardware as described in the
system BIOS according to the SMBIOS/DMI standard. This information
typically includes system manufacturer, model name, serial number,
BIOS version, asset tag as well as a lot of other details of varying
level of interest and reliability depending on the manufacturer.

This will often include usage status for the CPU sockets, expansion
slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of
I/O ports (e.g. serial, parallel, USB).

%description -l ja
dmidecode を使うと、SMBIOS/DMI 規格に基づき、BIOS 上の
x86 / ia64 ハードウェア情報を表示することができます。
表示される情報には、ハードウェアの製造元、モデル名、シリアル番号、
BIOS のバージョンなど、数多くの詳細なハードウェア情報が含まれます。


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1

%build
%make_build CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}"


%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install-man


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%license LICENSE
%doc AUTHORS CHANGELOG README
%{_sbindir}/dmidecode
%ifnarch ia64
%{_sbindir}/vpddecode
%{_sbindir}/ownership
%{_sbindir}/biosdecode
%endif
%{_mandir}/man8/*


%changelog
* Sat Mar 21 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.2-1
- new upstream release.
- replaced all patches with rawhide's.

* Mon Jan 13 2014 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.12-1
- new upstream release
- import patch0 from Fedora

* Fri Apr 22 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.11-1
- update to 2.11

* Fri May 23 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.9-2
- spec in UTF-8

* Sat May 10 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.9-1
- initial build for Vine Linux

* Sat May 10 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1:2.9-1.30.1
- initial build for Vine Linux

* Fri Mar 14 2008 Doug Chapman <doug.chapman@hp.com> 1:2.9-1.29.1
- Do not package vpddecode, ownership and biosdecode on ia64 since those are x86 only

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:2.9-1.27.1
- Autorebuild for GCC 4.3

* Mon Oct 22 2007 Prarit Bhargava <prarit@redhat.com> - 1:2.9
- rebuild with version 2.9
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:2.7-1.25.1
- rebuild

* Thu Feb 09 2006 Dave Jones <davej@redhat.com>
- rebuild.

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon Nov 28 2005 Dave Jones <davej@redhat.com>
- Integrate several specfile cleanups from Robert Scheck. (#172543)

* Sat Sep 24 2005 Dave Jones <davej@redhat.com>
- Revert yesterdays patch, its unneeded in 2.7

* Fri Sep 23 2005 Dave Jones <davej@redhat.com>
- Don't try to modify areas mmap'd read-only.
- Don't build on ia64 any more.
  (It breaks on some boxes very badly, and works on very few).

* Mon Sep 12 2005 Dave Jones <davej@redhat.com>
- Update to upstream 2.7

* Fri Apr 15 2005 Florian La Roche <laroche@redhat.com>
- remove empty scripts

* Wed Mar  2 2005 Dave Jones <davej@redhat.com>
- Update to upstream 2.6

* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
- Rebuild for gcc4

* Tue Feb  8 2005 Dave Jones <davej@redhat.com>
- Rebuild with -D_FORTIFY_SOURCE=2

* Tue Jan 11 2005 Dave Jones <davej@redhat.com>
- Add missing Obsoletes: kernel-utils

* Mon Jan 10 2005 Dave Jones <davej@redhat.com>
- Update to upstream 2.5 release.

* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
- Initial packaging, based upon kernel-utils package.

