Summary:        Intel ASL compiler/decompiler
Summary(ja):	Intel ASL コンパイラ/デコンパイラ
Name:           iasl
Version:        20090123
Release:        1%{?_dist_release}

Group:          Development/Languages
License:        Intel ACPI, http://www.intel.com/technology/iapc/acpi/license2.htm
URL:            http://developer.intel.com/technology/iapc/acpi/ 
Source0:        http://www.intel.com/technology/iapc/acpi/downloads/acpica-unix-%{version}.tar.gz
Source2:        http://ftp.debian.org/debian/pool/main/a/acpica-unix/acpica-unix_20061109-0.1.diff.gz

BuildRoot:     %{_tmppath}/%{name}-%{version}-root
BuildRequires: bison
BuildRequires: flex
BuildRequires: patchutils

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

%description -l ja
iasl は ASL (ACPI ソース言語) から AML (ACPI マシン言語) へのコンパイラ
です。AML は システムファームウェアに DSDT として取り込むことができます。
また、AML をデバックのために逆コンパイルすることもできます。


%prep
%setup -q -n acpica-unix-%{version}
zcat %{SOURCE2} |  filterdiff -i \*iasl.1  | patch -p2

%build
export CC=gcc
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$CFLAGS"
cd compiler
# does not compile with %{?_smp_mflags}
make


%install
rm -rf $RPM_BUILD_ROOT
install -p -D compiler/iasl $RPM_BUILD_ROOT%{_bindir}/iasl
install -m 0644 -p -D iasl.1 $RPM_BUILD_ROOT%{_mandir}/man1/iasl.1

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc changes.txt README
%{_bindir}/iasl
%{_mandir}/man1/iasl.1.gz


%changelog
* Sun Feb 15 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 20090123-1
- new upstream release
- applied new versioning policy, spec in UTF-8

* Thu Nov 01 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 20061109-0vl1
- initial build for Vine Linux

* Sat Aug 11 2007 Till Maas <opensource till name> - 20061109-3
- update License Tag to new Guidelines
- rebuild because of #251794

* Tue Feb 20 2007 Till Maas <opensource till name> - 20061109-2
- Make description line less than 80 instead of less that 81 characters long
- Permissions of manpage are 0644 instead of 0755 now

* Thu Feb 01 2007 Till Maas <opensource till name> - 20061109-1
- initial spec for Fedora Extras
