]> git.pld-linux.org Git - packages/r8168.git/blame - r8168.spec
- fix building with kernel 5.19, rel 3
[packages/r8168.git] / r8168.spec
CommitLineData
d558c20d 1# Conditional build:
d558c20d
ER
2%bcond_with verbose # verbose build (V=1)
3
2a8f34f5
JR
4# nothing to be placed to debuginfo package
5%define _enable_debug_packages 0
6
b550b8cb 7%define rel 3
a49d820a 8%define pname r8168
7f7a21b1
JB
9Summary: Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
10Summary(pl.UTF-8): Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
a49d820a 11Name: %{pname}%{_alt_kernel}
1466d4a0 12Version: 8.049.02
2a8f34f5 13Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
d558c20d
ER
14License: GPL
15Group: Base/Kernel
16URL: http://www.realtek.com.tw/
639842d4 17# Check for new versions at
c9239e71 18# https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
639842d4 19# unfortunately this download is not DF-friendly.
a49d820a 20Source0: %{pname}-%{version}.tar.bz2
1466d4a0
JR
21# Source0-md5: 9c2191ca3ff85102bc18a41916eceb8b
22Patch0: kernel-5.17.patch
1f71d8bf 23Patch1: kernel-5.18.patch
b550b8cb 24Patch2: kernel-5.19.patch
aadcf43b
JR
25BuildRequires: rpmbuild(macros) >= 1.701
26%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
a49d820a 27BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
d558c20d
ER
28
29%description
30Driver (Linux kernel module) for RTL8111/8168B PCI Express Gigabit
31Ethernet controllers.
32
7f7a21b1
JB
33%description -l pl.UTF-8
34Sterownik (moduł jądra Linuksa) dla kart sieciowych RTL8111/8168B PCI
35Express Gigabit Ethernet.
36
2a8f34f5
JR
37%define kernel_pkg()\
38%package -n kernel%{_alt_kernel}-net-r8168\
39Summary: Linux kernel module for RTL8111/8168B PCI Express Gigabit Ethernet controllers\
40Summary(pl.UTF-8): Moduł jądra Linuksa dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet\
41Release: %{rel}@%{_kernel_ver_str}\
42Group: Base/Kernel\
43Requires(post,postun): /sbin/depmod\
2a8f34f5
JR
44%requires_releq_kernel\
45Requires(postun): %releq_kernel\
2a8f34f5
JR
46\
47%description -n kernel%{_alt_kernel}-net-r8168\
48Driver (Linux kernel module) for RTL8111/8168B PCI Express Gigabit\
49Ethernet controllers.\
50\
51%description -n kernel%{_alt_kernel}-net-r8168 -l pl.UTF-8\
52Sterownik (moduł jądra Linuksa) dla kart sieciowych RTL8111/8168B PCI\
53Express 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}
d558c20d 66
2a8f34f5
JR
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}
d558c20d 71
aadcf43b 72%{expand:%create_kernel_packages}
d558c20d
ER
73
74%prep
c2aabb6c 75%setup -q -n %{pname}-%{version}
8f8e7110 76%patch0 -p1
1f71d8bf 77%patch1 -p1
b550b8cb 78%patch2 -p1
d558c20d
ER
79
80%build
aadcf43b 81%{expand:%build_kernel_packages}
d558c20d
ER
82
83%install
84rm -rf $RPM_BUILD_ROOT
2a8f34f5
JR
85install -d $RPM_BUILD_ROOT
86
87cp -a installed/* $RPM_BUILD_ROOT
d558c20d
ER
88
89%clean
90rm -rf $RPM_BUILD_ROOT
This page took 0.116937 seconds and 4 git commands to generate.