LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File wacom.spec of Package wacom (Project home:javierllorente)

Name:           wacom
Summary:        Kernel modules for Wacom Tablets
Version:        0.20.0
Release:        0
Group:          Hardware/Other
License:        GPL-2.0+
Url:            http://linuxwacom.sourceforge.net/
Source:         http://downloads.sourceforge.net/linuxwacom/input-%{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %kernel_module_package_buildreqs
BuildRequires:  autoconf
BuildRequires:  automake
ExclusiveArch:  %{ix86} x86_64

%suse_kernel_module_package -p %{_sourcedir}/preamble um

%define kver %(rpm -q --qf '%%{VERSION}' kernel-syms|perl -ne '/(\\d+)\\.(\\d+)\\.(\\d+)?/&&printf "%%d%%02d%%02d\\n",$1,$2,$3')
%if 0%{?kver} >= 30700
%define _kernel_ver 3.7
%else
%if 0%{?kver} >= 20638
%define _kernel_ver 2.6.38
%else
%if 0%{?kver} >= 20636
%define _kernel_ver 2.6.36
%else
%define _kernel_ver 2.6.30
%endif
%endif
%endif

%description
This package contains the wacom kernel driver.

%package kmp
Group:          Hardware/Other
Summary:        Kernel modules for Wacom Tablets

%description kmp
This package contains the wacom kernel driver.

%prep
%setup -q -n input-%{name}-%{version}

%build
autoreconf -i -v
%configure --with-kernel=/usr/src/linux
%{__make} clean
%{__mkdir_p} obj
for flavor in %flavors_to_build; do
    %{__rm} -rf obj/$flavor
    %{__cp} -r %{_kernel_ver} obj/$flavor
    %{__make} -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor
done

%install
# 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

%changelog