]> git.pld-linux.org Git - packages/r8168.git/blob - r8168.spec
- fix building with kernel 5.19, rel 3
[packages/r8168.git] / r8168.spec
1 # Conditional build:
2 %bcond_with     verbose         # verbose build (V=1)
3
4 # nothing to be placed to debuginfo package
5 %define         _enable_debug_packages  0
6
7 %define         rel     3
8 %define         pname   r8168
9 Summary:        Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
10 Summary(pl.UTF-8):      Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
11 Name:           %{pname}%{_alt_kernel}
12 Version:        8.049.02
13 Release:        %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
14 License:        GPL
15 Group:          Base/Kernel
16 URL:            http://www.realtek.com.tw/
17 # Check for new versions at
18 # https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
19 # unfortunately this download is not DF-friendly.
20 Source0:        %{pname}-%{version}.tar.bz2
21 # Source0-md5:  9c2191ca3ff85102bc18a41916eceb8b
22 Patch0:         kernel-5.17.patch
23 Patch1:         kernel-5.18.patch
24 Patch2:         kernel-5.19.patch
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 (Linux kernel module) for RTL8111/8168B PCI Express Gigabit
31 Ethernet controllers.
32
33 %description -l pl.UTF-8
34 Sterownik (moduł jądra Linuksa) dla kart sieciowych RTL8111/8168B PCI
35 Express Gigabit Ethernet.
36
37 %define kernel_pkg()\
38 %package -n kernel%{_alt_kernel}-net-r8168\
39 Summary:        Linux kernel module for RTL8111/8168B PCI Express Gigabit Ethernet controllers\
40 Summary(pl.UTF-8):      Moduł jądra Linuksa dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet\
41 Release:        %{rel}@%{_kernel_ver_str}\
42 Group:          Base/Kernel\
43 Requires(post,postun):  /sbin/depmod\
44 %requires_releq_kernel\
45 Requires(postun):       %releq_kernel\
46 \
47 %description -n kernel%{_alt_kernel}-net-r8168\
48 Driver (Linux kernel module) for RTL8111/8168B PCI Express Gigabit\
49 Ethernet controllers.\
50 \
51 %description -n kernel%{_alt_kernel}-net-r8168 -l pl.UTF-8\
52 Sterownik (moduł jądra Linuksa) dla kart sieciowych RTL8111/8168B PCI\
53 Express Gigabit Ethernet.\
54 \
55 %files -n kernel%{_alt_kernel}-net-r8168\
56 %defattr(644,root,root,755)\
57 %doc README\
58 /lib/modules/%{_kernel_ver}/kernel/drivers/net/*.ko*\
59 \
60 %post   -n kernel%{_alt_kernel}-net-r8168\
61 %depmod %{_kernel_ver}\
62 \
63 %postun -n kernel%{_alt_kernel}-net-r8168\
64 %depmod %{_kernel_ver}\
65 %{nil}
66
67 %define build_kernel_pkg()\
68 %build_kernel_modules -m r8168 -C src KERNELRELEASE=%{_kernel_ver}\
69 %install_kernel_modules -D installed -m src/r8168 -d kernel/drivers/net\
70 %{nil}
71
72 %{expand:%create_kernel_packages}
73
74 %prep
75 %setup -q -n %{pname}-%{version}
76 %patch0 -p1
77 %patch1 -p1
78 %patch2 -p1
79
80 %build
81 %{expand:%build_kernel_packages}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT
86
87 cp -a installed/* $RPM_BUILD_ROOT
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
This page took 0.052266 seconds and 3 git commands to generate.