Accepting request 764221 from home:tiwai:branches:multimedia:libs

- Install license-related files into licensesdir
- Drop the support for old distros (<1200), drop old udev rules

OBS-URL: https://build.opensuse.org/request/show/764221
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-firmware?expand=0&rev=34
This commit is contained in:
Takashi Iwai 2020-01-14 10:16:19 +00:00 committed by Git OBS Bridge
parent da407bb638
commit 8b56fe5ec8
3 changed files with 21 additions and 20 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 14 10:43:56 CET 2020 - tiwai@suse.de
- Install license-related files into licensesdir
- Drop the support for old distros (<1200), drop old udev rules
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 14 09:13:44 CET 2020 - tiwai@suse.de Tue Jan 14 09:13:44 CET 2020 - tiwai@suse.de

View File

@ -33,7 +33,6 @@ Version: 1.2.1
Release: 0 Release: 0
Source: ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-%{version}.tar.bz2 Source: ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-%{version}.tar.bz2
Source1: usx2yaudio.rules Source1: usx2yaudio.rules
Source2: usx2yaudio-old.rules
Source10: ftp://ftp.alsa-project.org/pub/misc/sof/sof-firmware-%{sof_version}.tar.bz2 Source10: ftp://ftp.alsa-project.org/pub/misc/sof/sof-firmware-%{sof_version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
@ -102,12 +101,10 @@ rm -f %{buildroot}/lib/firmware/intel/*/LICENCE
for d in vxloader mixartloader pcxhrloader; do for d in vxloader mixartloader pcxhrloader; do
rm -rf %{buildroot}%{_datadir}/alsa/firmware/$d rm -rf %{buildroot}%{_datadir}/alsa/firmware/$d
done done
%if 0%{?suse_version} >= 1120
# some files are included in the new "kernel-firmware" package # some files are included in the new "kernel-firmware" package
for d in ess korg sb16 yamaha; do for d in ess korg sb16 yamaha; do
rm -rf %{buildroot}/lib/firmware/$d rm -rf %{buildroot}/lib/firmware/$d
done done
%endif
# change identical files to symlinks for hdsploader # change identical files to symlinks for hdsploader
pushd %{buildroot}%{_datadir}/alsa/firmware/hdsploader pushd %{buildroot}%{_datadir}/alsa/firmware/hdsploader
for i in *.bin; do for i in *.bin; do
@ -124,31 +121,37 @@ popd
rm -rf %{buildroot}/lib/firmware/turtlebeach rm -rf %{buildroot}/lib/firmware/turtlebeach
# install documents # install documents
mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_docdir}/%{name}
install -c -m 0644 COPYING %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_licensedir}/%{name}
install -c -m 0644 COPYING %{buildroot}%{_licensedir}/%{name}
install -c -m 0644 README %{buildroot}%{_docdir}/%{name} install -c -m 0644 README %{buildroot}%{_docdir}/%{name}
for d in echoaudio hdsploader mixartloader pcxhrloader usx2yloader vxloader asihpi ca0132; do for d in echoaudio hdsploader mixartloader pcxhrloader usx2yloader vxloader asihpi ca0132; do
(cd $d (cd $d
n=${d##*/} n=${d##*/}
mkdir -p %{buildroot}%{_docdir}/%{name}/$n mkdir -p %{buildroot}%{_docdir}/%{name}/$n
for f in AUTHORS COPYING ChangeLog NEWS README* TODO creative.txt; do for f in AUTHORS ChangeLog README* TODO *.txt; do
test -f $f || continue test -f $f || continue
install -c -m 0644 $f %{buildroot}%{_docdir}/%{name}/$n case $f in
licen[cs]e*)
mkdir -p %{buildroot}%{_licensedir}/%{name}/$n
install -c -m 0644 $f %{buildroot}%{_licensedir}/%{name}/$n
;;
*)
install -c -m 0644 $f %{buildroot}%{_docdir}/%{name}/$n
;;
esac
done done
) )
done done
mkdir %{buildroot}%{_docdir}/%{name}/sof mkdir %{buildroot}%{_licensedir}/%{name}/sof
cp usr/lib/firmware/intel/sof/LICENCE %{buildroot}%{_docdir}/%{name}/sof cp usr/lib/firmware/intel/sof/LICENCE %{buildroot}%{_licensedir}/%{name}/sof
# udev rules # udev rules
%if 0%{?suse_version} > 1020
install -D -c -m 0644 %{SOURCE1} %{buildroot}%{_udevdir}/rules.d/52-usx2yaudio.rules install -D -c -m 0644 %{SOURCE1} %{buildroot}%{_udevdir}/rules.d/52-usx2yaudio.rules
%else
install -D -c -m 0644 %{SOURCE2} %{buildroot}%{_udevdir}/rules.d/52-usx2yaudio.rules
%endif
%fdupes -s %{buildroot} %fdupes -s %{buildroot}
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%doc %{_docdir}/%{name} %doc %{_docdir}/%{name}
%license %{_licensedir}/%{name}
/lib/firmware/* /lib/firmware/*
%{_datadir}/alsa %{_datadir}/alsa
%{_udevdir} %{_udevdir}

View File

@ -1,8 +0,0 @@
# Load firmware via fxload
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="800[157]", RUN+="/usr/bin/usx2yloader"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="8001", RUN+="/sbin/startproc /usr/bin/us428control -m us428"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="8005", RUN+="/sbin/startproc /usr/bin/us428control -m us224"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="8000", RUN+="/sbin/fxload -s /usr/share/alsa/firmware/usx2yloader/tascam_loader.ihx -I /usr/share/alsa/firmware/usx2yloader/us428fw.ihx -D $env{DEVNAME}"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="8004", RUN+="/sbin/fxload -s /usr/share/alsa/firmware/usx2yloader/tascam_loader.ihx -I /usr/share/alsa/firmware/usx2yloader/us224fw.ihx -D $env{DEVNAME}"
SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1604", SYSFS{idProduct}=="8006", RUN+="/sbin/fxload -s /usr/share/alsa/firmware/usx2yloader/tascam_loader.ihx -I /usr/share/alsa/firmware/usx2yloader/us122fw.ihx -D $env{DEVNAME}"