File hdjmod.spec of Package hdjmod

#
# spec file for package hdjmod
#
# Copyright 2008 Matthias Bach <marix@marix.org>
#
# 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.

# norootforbuild

Name:           hdjmod
Version:        1.28
Release:        0
License:        GPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} < 1120
BuildRequires:  %kernel_module_package_buildreq module-init-tools
%else
BuildRequires:  %kernel_module_package_buildreqs
%endif
Group:          System/Kernel
Summary:        Support for Hercules DJ Devices
URL:            http://ts.hercules.com/ger/index.php?pg=view_files&gid=17&fid=62&pid=177&cid=1
Source0:        hdjmod-%{version}.tar.bz2
Patch0:         hdjmod_kernel_2.6.30.patch
Patch1:         hdjmod-kfree.patch
Patch2:         hdjmod_kernel_2.6.36.patch.bz2
Patch3:         hdjmod_kernel_2.6.37.patch

# The package triggers RPM-Lint warning because it misses requires to the proper kernel packages
# These requires should be added by the kernel_module_package macro, so, therefore the are not
# fixed in this package. See also https://bugzilla.novell.com/show_bug.cgi?id=479141.

%kernel_module_package

%description
This is the Hercules DJ Series Kernel Module, which supports Hercules DJ Devices.

%prep
echo %flavors_to_build
%setup
%if 0%{?suse_version} >= 1120
%patch0 -p1
%endif
%if 0%{?suse_version} >= 1140
%patch2 -p1
%patch3 -F3 -p1
%endif
%patch1 -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj

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

%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
        make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done

%changelog
openSUSE Build Service is sponsored by