6168fa80f9a7df82a0c356f600481c41033ad35f
[packages/rtl8812au.git] / rtl8812au.spec
1 #
2 # Conditional build:
3 %bcond_with     verbose         # verbose build (V=1)
4
5 # nothing to be placed to debuginfo package
6 %define         _enable_debug_packages  0
7
8 %define         rel     3
9 %define         snap    20190309
10 %define         pname   rtl8812au
11 Summary:        Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter
12 Name:           %{pname}%{_alt_kernel}
13 Version:        5.2.20.2
14 Epoch:          2
15 Release:        0.%{snap}.%{rel}%{?_pld_builder:@%{_kernel_ver_str}}
16 License:        GPL
17 Group:          Base/Kernel
18 Source0:        https://github.com/gordboy/rtl8812au/archive/master/%{pname}-%{version}-%{snap}.tar.gz
19 # Source0-md5:  5b5b12a758b949dd6fd76fe557084462
20 Patch0:         kernel-5.1.patch
21 Patch1:         kernel-5.2.patch
22 # good luck finding this chip on Realtek website :/
23 #URL:           http://www.realtek.com.tw/
24 URL:            https://github.com/gordboy/rtl8812au
25 BuildRequires:  rpmbuild(macros) >= 1.701
26 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
27 BuildRoot:      %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
28
29 %description
30 Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter.
31
32 %define kernel_pkg()\
33 %package -n kernel%{_alt_kernel}-net-rtl8812au\
34 Summary:        Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter\
35 Release:        0.%{snap}.%{rel}@%{_kernel_ver_str}\
36 Group:          Base/Kernel\
37 Requires(post,postun):  /sbin/depmod\
38 %requires_releq_kernel\
39 Requires(postun):       %releq_kernel\
40 \
41 %description -n kernel%{_alt_kernel}-net-rtl8812au\
42 Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter\
43 \
44 %files -n kernel%{_alt_kernel}-net-rtl8812au\
45 %defattr(644,root,root,755)\
46 %doc Realtek_Changelog.txt README.md\
47 /lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless/*.ko*\
48 \
49 %post   -n kernel%{_alt_kernel}-net-rtl8812au\
50 %depmod %{_kernel_ver}\
51 \
52 %postun -n kernel%{_alt_kernel}-net-rtl8812au\
53 %depmod %{_kernel_ver}\
54 %{nil}
55
56 %define build_kernel_pkg()\
57 %{__make} clean KVER=%{_kernel_ver} KSRC=%{_kernelsrcdir}\
58 %{__make} modules KVER=%{_kernel_ver} KSRC=%{_kernelsrcdir}\
59 %install_kernel_modules -D installed -m 8812au -d kernel/drivers/net/wireless\
60 %{nil}
61
62 %{expand:%create_kernel_packages}
63
64 %prep
65 %setup -q -n %{pname}-master
66 %patch0 -p1
67 %patch1 -p1
68
69 %build
70 %{expand:%build_kernel_packages}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT
75
76 cp -a installed/* $RPM_BUILD_ROOT
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
This page took 0.034664 seconds and 2 git commands to generate.