File midisport-firmware.spec of Package midisport-firmware

# spec file for package midisport-firmware
# Copyright (c) 2012 B1 Systems GmbH, Vohburg, 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.

# norootforbuild

Name:           midisport-firmware
Version:        1.2
Release:        0
License:        GPL-2.0+ and SUSE-Firmware
Summary:        Firmware for MidiSport USB MIDI interfaces from M-Audio/Midiman
Group:          Productivity/Multimedia/Sound/Midi
Source:         midisport-firmware-1.2.tar.gz
# patches are all from the debian package
Patch0:         configure-drop-udev-check.patch
Patch1:         udev-rule.patch
BuildRequires:  fxload autoconf automake udev
Requires:       fxload udev
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%if %( expr `rpm -q --queryformat %%{version} udev` \> 190 ) == 1
%define udevdir /usr/lib/udev
%define udevdir /lib/udev

This package allows you to use the MidiSport USB MIDI interfaces from
M-Audio/Midiman with Linux. It sets up udev rules to automatically load
the firmware into the device.

%setup -q
%patch0 -p1
%patch1 -p1

%configure --with-udev=%{udevdir}
make %{?_smp_mflags}


%{?buildroot:%__rm -rf "%{buildroot}"}