File realtek-r8192se.spec of Package realtek-r8192se
# norootforbuild
Name: realtek-r8192se
BuildRequires: %kernel_module_package_buildreqs
BuildRequires: dos2unix
License: GNU GPL v2
Group: System/Kernel
Summary: Driver for RTL8192SE PCI wireless card
Version: 0017
Release: 0
%define srcver 2.6.%{version}.0507.2010
Source: rtl8192se_linux_%{srcver}.tar.bz2
Patch: rtl8192se_linux_%{srcver}-firmware.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#Requires: %{name}-firmware = %{version}
#Supplements: modalias(pci:v000010ECd00008172sv*sd*bc*sc*i*)
%kernel_module_package
%description
This source package produces the needed KMPs for the Realtek R8192 SE PCI wireless
driver and the firmware package.
%package firmware
License: Redistributable in unmodified form (Realtek Firmware License)
Group: System/Kernel
Summary: Firmware for the RTL8192SE_PCI driver
#BuildArch: noarch
%description firmware
The Firmware that's needed to operate the RTL8192SE PCI card.
This firmware may be redistributed in unmodified form, see exact license
terms in %{_docdir}/realtek-r8192se-firmware/Realtek-Firmware-License.txt.
%prep
%setup -n rtl8192se_linux_%{srcver}
%patch -p1
dos2unix firmware/RTL8192SE/Realtek-Firmware-License.txt
find . -type f | xargs chmod 644
chmod +x realtek/*.sh runwpa wlan0*
sed -i 's/^R8192_DRIVERNAME=/R8192_DRIVERNAME=rtl819xSE; test -n "$1" \&\& R8192_DRIVERNAME=/' realtek/wireless-rtl-ac-dc-power.sh
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -lr source obj/$flavor
make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor/HAL/rtl8192 %{?jobs:-j%jobs}
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/HAL/rtl8192
done
install -d $RPM_BUILD_ROOT/lib/firmware/RTL8192SE
install -m 0644 source/firmware/RTL8192SE/*.bin $RPM_BUILD_ROOT/lib/firmware/RTL8192SE/
#install -d $RPM_BUILD_ROOT/usr/sbin
#install -m 0755 source/realtek/*.sh $RPM_BUILD_ROOT/usr/sbin/
%files firmware
%defattr(-,root,root)
%doc source/firmware/RTL8192SE/Realtek-Firmware-License.txt
%doc source/realtek/*.sh
%doc source/readme.txt source/release_note
%dir /lib/firmware/RTL8192SE
/lib/firmware/RTL8192SE/*