forked from pool/kernel-firmware
- fix supplements generation with rpm-4.9
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=39
This commit is contained in:
parent
8ab1fef1ca
commit
6d8d26ec13
23
firmware.sh
23
firmware.sh
@ -54,6 +54,29 @@ get_kernel_dir()
|
|||||||
usage
|
usage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cache=
|
||||||
|
if test "$1" = "--cache" ; then
|
||||||
|
cache=$2
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$1" = "--find-supplements" -a -n "$cache" ; then
|
||||||
|
if ! test -e "$cache"; then
|
||||||
|
get_kernel_dir
|
||||||
|
echo "Using $kernel" >&2
|
||||||
|
find "$kernel" -name '*.ko' -type f | while read ko; do
|
||||||
|
/sbin/modinfo -F firmware "$ko" | sed -e "s@\$@ $ko@"
|
||||||
|
done > $cache
|
||||||
|
fi
|
||||||
|
while read fw ; do
|
||||||
|
sed -n -e "s@^${fw#$RPM_BUILD_ROOT/lib/firmware/} @@p" < "$cache"
|
||||||
|
done | sort | \
|
||||||
|
RPMBUILD_SPECFILE=/dev/null /usr/lib/rpm/find-supplements.ksyms | \
|
||||||
|
sed 's/^modalias(kernel-[^:]*:/modalias(/' # strip the kernel-$flavor: prefix
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
trap 'rm -rf "$tmp"' EXIT
|
trap 'rm -rf "$tmp"' EXIT
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 25 18:04:35 CEST 2011 - mls@suse.de
|
||||||
|
|
||||||
|
- fix supplements generation with rpm-4.9
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 12 14:57:20 CEST 2011 - dmueller@suse.de
|
Fri Aug 12 14:57:20 CEST 2011 - dmueller@suse.de
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ Source2: qlogic.tar.bz2
|
|||||||
Source3: iwlwifi-4965-1.ucode
|
Source3: iwlwifi-4965-1.ucode
|
||||||
Source4: t4fw.bin
|
Source4: t4fw.bin
|
||||||
%define __find_supplements bash %_sourcedir/firmware.sh --find-supplements
|
%define __find_supplements bash %_sourcedir/firmware.sh --find-supplements
|
||||||
|
%define __ksyms_supplements bash %_sourcedir/firmware.sh --cache %{_builddir}/%{?buildsubdir}/find_supplements.cache --find-supplements
|
||||||
|
%define __ksyms_path ^/lib/firmware
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: qlogic-firmware
|
Provides: qlogic-firmware
|
||||||
@ -61,7 +63,6 @@ Provides: iwl6000g2-ucode
|
|||||||
Obsoletes: iwl6000g2-ucode
|
Obsoletes: iwl6000g2-ucode
|
||||||
Provides: ath3k-firmware
|
Provides: ath3k-firmware
|
||||||
Obsoletes: ath3k-firmware
|
Obsoletes: ath3k-firmware
|
||||||
AutoReq: off
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the firmware for in-kernel drivers that was
|
This package contains the firmware for in-kernel drivers that was
|
||||||
@ -84,6 +85,7 @@ cp -avf * %{buildroot}/lib/firmware
|
|||||||
rm -f %{buildroot}/lib/firmware/WHENCE
|
rm -f %{buildroot}/lib/firmware/WHENCE
|
||||||
bash %_sourcedir/firmware.sh --kill-duplicates %buildroot/lib/firmware/
|
bash %_sourcedir/firmware.sh --kill-duplicates %buildroot/lib/firmware/
|
||||||
%fdupes %{buildroot}
|
%fdupes %{buildroot}
|
||||||
|
rm -f find_supplements.cache
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
Loading…
Reference in New Issue
Block a user