File appleir.spec of Package appleir

#
# spec file for package appleir (Version 1.1)
#
# Copyright (c) 2009 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
# nodebuginfo


Name:           appleir
BuildRequires:  kernel-source kernel-syms module-init-tools
Summary:        Kernel modules for USB Apple IR
Version:        1.1
Release:        114.<RELEASE65>
Group:          System/Kernel
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.madingley.org/macmini/
AutoReqProv:    on
Source:         %{name}-%{version}.tar.bz2
Source2:        preamble
Patch:          appleir-1.1.dif
ExclusiveArch:  %ix86 x86_64
%suse_kernel_module_package -p %_sourcedir/preamble kdump um 

%package -n appleir-KMP
Group:          System/Kernel
License:        GPL v2 or later
Summary:        Kernel modules for USB Apple IR

%description 
Kernel modules for USB Apple infrared receiver as found in MacBookPro



%description -n appleir-KMP
Kernel modules for USB Apple infrared receiver as found in MacBookPro



%prep
%setup -n %{name}-%{version} 
%patch

%build
cd ..
mkdir -p obj
for flavor in %flavors_to_build; do
  rm -rf obj/$flavor
  cp -r %{name}-%{version} obj/$flavor
  make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
       M=$PWD/obj/$flavor
done

%install
cd ..
# install kernel modules
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
   make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
       M=$PWD/obj/$flavor
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README

%changelog
* Tue Jul 22 2008 ro@suse.de
- fix build with 2.6.26 (access to input_dev->private changed)
* Tue Mar 11 2008 ro@suse.de
- hack to build with 2.6.25
* Fri Jun 01 2007 ro@suse.de
- added README and patch to avoid compiler warning
* Fri Jun 01 2007 ro@suse.de
- imported Makefile from Sami Vento
* Fri Jun 01 2007 ro@suse.de
- created package based on kernel patch from
  http://www.madingley.org/macmini/