File acpica.spec of Package acpica

#
# spec file for package acpica
#
# Copyright (c) 2013 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:           acpica
Url:            http://acpica.org
Version:        20121220
Release:        6
License:        GPL-2.0
%define src_dir acpica-unix2-%{version}
%define dmp_ver 20110323
Group:          Development/Tools/Debuggers
Summary:        This is a set of tools to display and debug your BIOS ACPI tables
Source:         %{src_dir}.tar.bz2
Patch1:         acpica_make_CFLAGS_overridable
Patch2:         acpidump-override-CFLAGS.patch
Patch3:         acpica-no-compiletime.patch
Patch4:         bob_noop.patch
Source1:        ec_access.c
Source2:        acpidump-%{dmp_ver}.tar.bz2
Source3:        acpi_genl.tar.bz2
Source4:        acpi_validate
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 ia64 x86_64
BuildRequires:  bison flex glibc-devel
Provides:       iasl

%description
The included tools share the same code as it is used in the ACPI
implementation of the kernel. The code of the acpica project is exactly
the same as the ACPI parser and interpreter code of the kernel and the
code gets synced regularly from the acpica project into the kernel.
E.g. if you identify bugs in the kernel's ACPI implementation it might
be easier to debug them in userspace if possible. If the bug is part of
the acpica code, it has to be submitted to the acpica project to get
merged into the mainline kernel sources.

iasl compiles ASL (ACPI Source Language) into AML (ACPI Machine
Language). This AML is suitable for inclusion as a DSDT in system
firmware. It also can disassemble AML, for debugging purposes.



Authors:
--------
    "Moore, Robert" <robert.moore@intel.com>
    and other Intel people

%prep
%setup -n %{src_dir} -a 2 -a 3
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
cc %{SOURCE1} $RPM_OPT_FLAGS -o ec_access
make -C acpidump CFLAGS="$RPM_OPT_FLAGS"
make -C acpi_genl CFLAGS="$RPM_OPT_FLAGS"
make OPT_CFLAGS="$RPM_OPT_FLAGS"

%install
install -Dm 755 %{SOURCE4} %{buildroot}/usr/bin/acpi_validate
install -Dm 755 ec_access %{buildroot}/usr/sbin/ec_access

install -Dm 755 acpidump/acpidump %{buildroot}/usr/sbin/acpidump

install -Dm 755 acpi_genl/acpi_genl %{buildroot}/usr/sbin/acpi_genl
install -Dm 644 acpi_genl/README %{buildroot}/%{_docdir}/%{name}/README_acpi_genl

install -Dm 644 changes.txt %{buildroot}/%{_docdir}/%{name}/changes.txt
make install DESTDIR="%{buildroot}"

%files
%defattr(-,root,root)
/usr/bin/iasl
/usr/bin/acpiexec
/usr/bin/acpixtract
/usr/bin/acpisrc
/usr/sbin/acpidump
/usr/sbin/acpi_genl
/usr/sbin/ec_access
/usr/bin/acpibin
/usr/bin/acpihelp
/usr/bin/acpinames
/usr/bin/acpi_validate

%doc %{_docdir}/%{name}

%changelog
openSUSE Build Service is sponsored by