File acpica.spec of Package acpica

# spec file for package acpica
# Copyright (c) 2011 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

# norootforbuild

Name:           acpica
Version:        20110112
Release:        4.<RELEASE2>
License:        Intel ACPICA
%define src_dir acpica-unix-%{version}
%define dmp_ver 20101221
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-override-CFLAGS.diff
Patch2:         acpidump-override-CFLAGS.patch
Source1:        ec_access.c
Source2:        acpidump-%{dmp_ver}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 ia64 x86_64
BuildRequires:  bison flex

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.

    "Moore, Robert" <>
    and other Intel people

%setup -n %{src_dir} -a 2
%patch1 -p1
%patch2 -p1

cc %{SOURCE1} $RPM_OPT_FLAGS -o ec_access
make -C acpidump CFLAGS="$RPM_OPT_FLAGS"
make -C compiler CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
make -C tools/acpisrc CFLAGS="$RPM_OPT_FLAGS"
make -C tools/acpixtract CFLAGS="$RPM_OPT_FLAGS"
# this needs total recompilation with other flags
cp compiler/iasl .
make clean -C compiler CFLAGS="$RPM_OPT_FLAGS"
make -C tools/acpiexec CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"


install -Dm 755 ec_access %{buildroot}/usr/sbin/ec_access
install -Dm  755 acpidump/acpidump %{buildroot}/usr/sbin/acpidump
install -Dm 755 iasl %{buildroot}/usr/bin/iasl
install -Dm 755 tools/acpisrc/acpisrc %{buildroot}/usr/sbin/acpisrc
install -Dm 755 tools/acpiexec/acpiexec %{buildroot}/usr/bin/acpiexec
install -Dm 755 tools/acpixtract/acpixtract %{buildroot}/usr/bin/acpixtract
install -Dm 644 README %{buildroot}/%{_docdir}/%{name}/README
install -Dm 644 changes.txt %{buildroot}/%{_docdir}/%{name}/changes.txt

%doc %{_docdir}/%{name}