File firmwarekit.spec of Package firmwarekit

#
# spec file for package firmwarekit (Version 3)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#

# norootforbuild


Name:           firmwarekit
BuildRequires:  bash coreutils dhcp-client findutils gawk gdb glib2-devel
BuildRequires:  grep iproute2 module-init-tools ncurses-devel newt newt-devel
BuildRequires:  perl pkgconfig sed sharutils slang-devel sysvinit
%if %suse_version > 1110
BuildRequires:  acpica dmidecode
%else
BuildRequires:  pmtools
%endif
BuildRequires:  termcap util-linux wget xorg-x11-util-devel
Url:            http://www.linuxfirmwarekit.org
Summary:        BIOS checker that validates ACPI and other parts for x86 and x86_64 machines
Version:        3
Release:        45
License:        LGPLv2.1+
Group:          System/Boot
AutoReqProv:    on
PreReq:         gzip
%if %suse_version > 1110
Requires:       acpica dmidecode
%else
Requires:       pmtools
%endif
Requires:       hwinfo util-linux powertop
Summary:        BIOS checker that validates ACPI and other parts for x86 and x86_64 machines
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ia64
Source0:        %{name}-r%{version}.tar.bz2
Patch0:         adjust_paths.patch
Patch1:         biostest_sh.patch
Patch2:         rip_out_unneeded_stuff.patch
Patch3:         adjust_doc.patch
Patch4:         own_params.patch
Patch5:         scp_save_results.patch
Patch6:         use_external_pmtool_bins.patch
Patch7:         path_environment.patch
Patch8:         dmesg_adjust.patch
Patch9:         colors.patch
Patch10:        %{name}-use-external-powertop.patch
Patch11:        %{name}-overwrite-cflags.patch
Patch12:        %{name}-fix-rpmlint.patch
Patch13:        %{name}-outputdir
Patch14:        %{name}-dmidecode-detail

%description
This tool, developed by Intel, is meant for vendors to validate and
certifcate their BIOS. It is also convenient for ACPI or general BIOS
related bugs. If you have an ACPI error/warning, run this tool and
provide output for bug tracking information



Authors:
--------
    Intel

%prep
%setup -q -n linuxfirmwarekit
%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
# This is arch specific stuff, put all in /usr/lib/firmwarekit
%define location /usr/lib/%{name}

%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
make -e CFLAGS="$RPM_OPT_FLAGS"

%install
install -D -m 744 biostest.sh %{buildroot}/usr/sbin/biostest.sh
install -d -m 755 %{buildroot}/var/log/%{name}
install -D -m 644 results/resources.css %{buildroot}/var/log/%{name}/results.css
install -D -m 744 biostest %{buildroot}/%{location}/biostest
install -D -m 755 shelltools/start_test %{buildroot}/%{location}/bin/start_test
ln -s start_test %{buildroot}/%{location}/bin/announce_resource
ln -s start_test %{buildroot}/%{location}/bin/finish_test
ln -s start_test %{buildroot}/%{location}/bin/report_result
ln -s start_test %{buildroot}/%{location}/bin/report_testrun_progress
install -D -m 755 libstandalone.so           %{buildroot}/%{_libdir}/libstandalone.so.%{version}.%{release}
ln -s libstandalone.so.%{version}.%{release} %{buildroot}/%{_libdir}/libstandalone.so.%{version}
cp      -a        plugins %{buildroot}/%{location}/plugins
install -D -m 644 Documentation/QUICKSTART.txt %{buildroot}/%{_docdir}/%{name}/QUICKSTART.txt
install -D -m 644 Documentation/USERGUIDE.txt  %{buildroot}/%{_docdir}/%{name}/USERGUIDE.tx
gzip biostest.1
install -D -m 644 biostest.1.gz %{buildroot}/%{_mandir}/man1/biostest.1.gz
chmod 644 %{buildroot}/%{_mandir}/man1/biostest.1.gz
echo %{version} > %{buildroot}/%{location}/version

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/usr/sbin/biostest.sh
%{location}
/var/log/%{name}
/%{_libdir}/libstandalone.so.%{version}
/%{_libdir}/libstandalone.so.%{version}.%{release}
%{_docdir}/%{name}
%{_mandir}/man1/biostest.1.gz

%changelog
openSUSE Build Service is sponsored by