File usbd480ts.spec of Package usbd480ts

#
# spec file for package usbd480ts (Version 0.1)
#
# Copyright (c) 2010 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/
#
Summary:        Input Driver for the Touch Screen of the USBD480

Name:           usbd480ts
Version:        0.1
Release:        1
License:        GPL v2 or later
Group:          System/Boot
Url:            http://lcdinfo.com
Source0:        %{name}-%{version}.tar.bz2
Source1:        preamble
Source2:        05-usbd480.conf
Source3:        10-touchpad.conf
Patch0:         usbd480ts.patch
Patch1:         usbd480ts-kmalloc.patch
Patch2:		usbd480ts-buffer.patch
Patch3:         usbd480ts-debug.patch
Patch4:         usbd480ts-class.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description

This kernel module makes the toch screen of the USBD480 available as
an additional input device to the generic input device layer.

%package kmp
License:        GPL v2 or later
Summary:        Input Driver for the Touch Screen of the USBD480
Group:          System/Boot
BuildRequires:  %{kernel_module_package_buildreqs}
%suse_kernel_module_package -p preamble

%description kmp

This kernel module makes the toch screen of the USBD480 available as
an additional input device to the generic input device layer.


%prep
%setup -q -n %name
%patch -P 0
%patch -P 1
%patch -P 2
%patch -P 3
%patch -P 4

%build
FILES="Makefile usbd480ts.c"
for flavor in %{flavors_to_build}; do
    rm -rf obj/$flavor
    mkdir -p obj/$flavor
    cp -a $FILES obj/$flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor
done

%install
install -D -m 644 %{S:2} %buildroot/etc/X11/xorg.conf.d/05-usbd480.conf
install -D -m 644 %{S:3} %buildroot/etc/X11/usbd480/10-touchpad.conf
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
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,-)
%dir /etc/X11/xorg.conf.d
%config(noreplace) /etc/X11/xorg.conf.d/05-usbd480.conf
%dir /etc/X11/usbd480
%config(noreplace) /etc/X11/usbd480/10-touchpad.conf

%changelog
openSUSE Build Service is sponsored by