2006-12-20 11:43:01 +01:00
|
|
|
#
|
2011-09-17 14:43:37 +02:00
|
|
|
# spec file for package alsa-firmware
|
2006-12-20 11:43:01 +01:00
|
|
|
#
|
2011-09-17 14:43:37 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-12-20 11:43:01 +01:00
|
|
|
#
|
2009-01-22 16:43:44 +01:00
|
|
|
# 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.
|
|
|
|
|
2006-12-20 11:43:01 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-06-27 20:00:28 +02:00
|
|
|
|
2006-12-20 11:43:01 +01:00
|
|
|
Name: alsa-firmware
|
2011-02-01 15:03:40 +01:00
|
|
|
%define package_version 1.0.24.1
|
2007-10-16 18:35:53 +02:00
|
|
|
Url: http://www.alsa-project.org/
|
2006-12-20 11:43:01 +01:00
|
|
|
Summary: Firmware Data Files for ALSA
|
2011-02-01 15:03:40 +01:00
|
|
|
Version: 1.0.24.1
|
|
|
|
Release: 1
|
2010-04-19 11:02:58 +02:00
|
|
|
License: GPLv2+
|
2006-12-20 11:43:01 +01:00
|
|
|
Group: Hardware/Other
|
|
|
|
Source: ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-%{package_version}.tar.bz2
|
2007-08-03 20:47:11 +02:00
|
|
|
Source1: usx2yaudio.rules
|
|
|
|
Source2: usx2yaudio-old.rules
|
2006-12-20 11:43:01 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-10-16 18:35:53 +02:00
|
|
|
BuildArch: noarch
|
2006-12-20 11:43:01 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Various firmware data files for ALSA drivers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2007-06-05 00:42:01 +02:00
|
|
|
%setup -q -n %{name}-%{package_version}
|
2006-12-20 11:43:01 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
2007-06-05 00:42:01 +02:00
|
|
|
%configure \
|
2006-12-20 11:43:01 +01:00
|
|
|
--enable-loader \
|
|
|
|
--enable-hotplug \
|
|
|
|
--with-hotplug-dir=/lib/firmware
|
2011-09-17 14:43:37 +02:00
|
|
|
make %{?_smp_mflags}
|
2006-12-20 11:43:01 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR="$RPM_BUILD_ROOT" install
|
|
|
|
# remove unnecessary loader firmwares
|
2009-10-08 04:07:16 +02:00
|
|
|
for d in vxloader mixartloader pcxhrloader; do
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/alsa/firmware/$d
|
|
|
|
done
|
2009-05-06 18:31:44 +02:00
|
|
|
%if %suse_version >= 1120
|
|
|
|
# some files are included in the new "kernel-firmware" package
|
2009-10-08 04:07:16 +02:00
|
|
|
for d in ess korg sb16 yamaha; do
|
|
|
|
rm -rf $RPM_BUILD_ROOT/lib/firmware/$d
|
2006-12-20 11:43:01 +01:00
|
|
|
done
|
2009-10-08 04:07:16 +02:00
|
|
|
%endif
|
2006-12-20 11:43:01 +01:00
|
|
|
# change identical files to symlinks for hdsploader
|
|
|
|
pushd $RPM_BUILD_ROOT%{_datadir}/alsa/firmware/hdsploader
|
|
|
|
for i in *.bin; do
|
|
|
|
hotplug=$RPM_BUILD_ROOT/lib/firmware/$i
|
|
|
|
if [ -f $hotplug ]; then
|
|
|
|
if cmp -s -b $hotplug $i; then
|
|
|
|
rm $i
|
|
|
|
ln -s /lib/firmware/$i
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
2007-03-15 01:36:17 +01:00
|
|
|
# FIXME: remove non-existing msnd firmware symlinks
|
|
|
|
rm -rf $RPM_BUILD_ROOT/lib/firmware/turtlebeach
|
2006-12-20 11:43:01 +01:00
|
|
|
# install documents
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
|
|
|
for d in echoaudio hdsploader mixartloader pcxhrloader usx2yloader vxloader asihpi; do
|
|
|
|
(cd $d
|
|
|
|
n=${d##*/}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/$n
|
|
|
|
for f in AUTHORS COPYING ChangeLog NEWS README* TODO; do
|
2009-03-05 16:36:34 +01:00
|
|
|
test -f $f || continue
|
|
|
|
install -c -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name}/$n
|
2006-12-20 11:43:01 +01:00
|
|
|
done
|
|
|
|
)
|
|
|
|
done
|
|
|
|
# udev rules
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
|
2007-08-03 20:47:11 +02:00
|
|
|
%if %suse_version > 1020
|
|
|
|
install -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/etc/udev/rules.d/52-usx2yaudio.rules
|
|
|
|
%else
|
|
|
|
install -c -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/udev/rules.d/52-usx2yaudio.rules
|
|
|
|
%endif
|
2006-12-20 11:43:01 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc %{_docdir}/%{name}
|
|
|
|
/lib/firmware/*
|
2007-06-05 20:05:02 +02:00
|
|
|
%{_datadir}/alsa
|
2006-12-20 11:43:01 +01:00
|
|
|
/etc/udev
|
2008-01-24 00:27:42 +01:00
|
|
|
|
2007-03-15 01:36:17 +01:00
|
|
|
%changelog
|