File logitech-g710-linux-driver.spec of Package logitech-g710-linux-driver

Name:           logitech-g710-linux-driver
Version:        0.0.1
Release:        0
License:        GPL2
Summary:        Logitech G710+ keyboard driver
Url:            https://github.com/Wattos/logitech-g710-linux-driver
Group:          System/Kernel
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  %{kernel_module_package_buildreqs}
Requires:       udev
Requires(post): udev
Requires(postun): udev
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%suse_kernel_module_package -n logitech-g710

%define udev_rules_dir /usr/lib/udev/rules.d

%description
Driver for special keys on the Logitech G710+ keyboard.

%prep
%setup -q

%build
for flavor in %{flavors_to_build}; do
        rm -rf obj/$flavor
        mkdir -p obj
        cp -r src/kernel obj/$flavor
        make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
done

%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
for flavor in %{flavors_to_build}; do
        make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done
mkdir -p %{buildroot}/%{udev_rules_dir}
cp misc/90-logitech* %{buildroot}/%{udev_rules_dir}

%post
%udev_rules_update

%postun
%udev_rules_update

%files
%defattr(-,root,root)
%{udev_rules_dir}/90-logitech*

%changelog
* Sun May 02 2015 Volker Krause <vkrause@kde.org> 0.0.1
  Initial logitech-g710-linux-driver package.