mt7601/mt7601.spec

81 lines
2.2 KiB
RPMSpec

Name: mt7601
Version: 20150731git
Release: 1mamba
Summary: Linux driver for MT7601U with patch for stability and performance on recent kernel versions
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/porjo/mt7601.git
## GITSOURCE https://github.com/porjo/mt7601.git master
Source: https://github.com/porjo/mt7601.git/master/mt7601-%{version}.tar.bz2
Patch0: mt7601-20150731git-add_device_2001_3D04.patch
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires(post):kernelheaders
Requires(post):dkms
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Linux driver for MT7601U with patch for stability and performance on recent kernel versions.
%debug_package
%prep
%setup -q
%patch0 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# dkms for vboxvideo
install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version}
cp -a src/* %{buildroot}%{_prefix}/src/%{name}-%{version}/
cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF
PACKAGE_NAME=%{name}
PACKAGE_VERSION=%{version}
MAKE="make LINUX_SRC=\"\${kernel_source_dir}\""
CLEAN="make LINUX_SRC=\"\${kernel_source_dir}\" clean"
BUILT_MODULE_NAME=mt7601Usta
BUILT_MODULE_LOCATION=./os/linux/
DEST_MODULE_LOCATION=/extra/drivers/net/wireless/
REMAKE_INITRD=no
AUTOINSTALL=yes
_EOF
install -d -m 0755 %{buildroot}%{_sysconfdir}/Wireless/RT2870STA/
cp src/RT2870STA.dat %{buildroot}%{_sysconfdir}/Wireless/RT2870STA/
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%preun
# erase
if [ $1 -eq 0 ]; then
dkms remove -q -m %{name} -v %{version} --all
fi
:
%post
if [ $1 -ge 1 ]; then
dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version} --force
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/Wireless/RT2870STA/RT2870STA.dat
%{_prefix}/src/%{name}-%{version}/dkms.conf
%dir %{_prefix}/src/%{name}-%{version}/
%{_prefix}/src/%{name}-%{version}/*
%doc LICENSE
%changelog
* Fri Jul 31 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 20150731git-1mamba
- package created using the webbuild interface