File acpica.spec of Package acpica

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

Name:           acpica
# How to fetch acpi-tools:
# git clone
# cd linux-2.6/tools/power/acpi
# mkdir -p include/acpi
# cp ../../../include/acpi/* include/acpi
# tar -cvjf acpi-tools-3.15 `find *`
Version:        20140214
Release:        0
%define acpi_tools_dir acpi-tools-3.14
%define src_dir acpica-unix2-%{version}
%define dmp_ver 20110323
Summary:        This is a set of tools to display and debug your BIOS ACPI tables
License:        GPL-2.0
Group:          Development/Tools/Debuggers
Source:         %{src_dir}.tar.bz2
Patch1:         acpica-no-compiletime.patch
Patch2:         wmidump_add_she_bang.patch
Source1:        ec_access.c
Source2:        acpi_genl.tar.bz2
Source3:        acpi_validate
Source4:        wmidump.tar.bz2
Source5:        %{acpi_tools_dir}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 ia64 x86_64
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  glibc-devel
Provides:       iasl

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 -a 4 -a 5
%patch1 -p1
%patch2 -p1

cc %{SOURCE1} %{optflags} -o ec_access
make -C acpi_genl CFLAGS="%{optflags}"
make -C wmidump CFLAGS="%{optflags}"
make OPT_CFLAGS="%{optflags}" HOST="_LINUX"
make -C %{acpi_tools_dir} CFLAGS="-DDEFINE_ALTERNATE_TYPES -I include %{optflags}"

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

install -Dm 755 wmidump/wmidump %{buildroot}/usr/bin/wmidump
install -Dm 755 wmidump/ %{buildroot}/usr/bin/wmixtract
install -Dm 644 wmidump/README %{buildroot}/%{_docdir}/%{name}/README_wmidump

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}"
# Latest acpidump is coming from kernel and not from acpica sources now.
rm -rf "%{buildroot}"/usr/bin/acpidump
make -C %{acpi_tools_dir} install DESTDIR="%{buildroot}" mandir=/usr/share/man


%doc %{_docdir}/%{name}

openSUSE Build Service is sponsored by