]>
Commit | Line | Data |
---|---|---|
98c916e7 BZ |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_with verbose # verbose build (V=1) | |
5 | # | |
6 | %define _rel 1 | |
7 | Summary: Attansic(R) L2 Fast Ethernet Adapter driver for Linux | |
19344d8e | 8 | Summary(pl.UTF-8): Sterownik do kart Attansic(R) L2 Fast Ethernet Adapter |
98c916e7 BZ |
9 | Name: kernel%{_alt_kernel}-net-atl2 |
10 | Version: 1.4.0.20 | |
11 | Release: %{_rel}@%{_kernel_ver_str} | |
12 | License: GPL v2 | |
13 | Group: Base/Kernel | |
14 | Source0: http://starowa.one.pl/~uzi/pld/atl2-%{version}.tar.gz | |
15 | # Source0-md5: 196771fa8e7164d4c9beabcfdf4058b5 | |
16e8464c | 16 | Patch0: kernel-net-atl2-build.patch |
19344d8e | 17 | URL: http://www.attansic.com/ |
98c916e7 BZ |
18 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} |
19 | BuildRequires: rpmbuild(macros) >= 1.379 | |
98c916e7 BZ |
20 | Requires(post,postun): /sbin/depmod |
21 | %if %{with dist_kernel} | |
22 | %requires_releq_kernel | |
23 | Requires(postun): %releq_kernel | |
24 | %endif | |
98c916e7 BZ |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
19344d8e JB |
28 | This package contains the Linux driver for the Attansic(R) L2 Fast |
29 | Ethernet Adapter. | |
98c916e7 BZ |
30 | |
31 | %description -l pl.UTF-8 | |
32 | Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych | |
33 | Attansic(R) L2 Fast Ethernet Adapter. | |
34 | ||
35 | %prep | |
36 | %setup -q -n atl2-%{version} | |
16e8464c | 37 | %patch0 -p0 |
98c916e7 BZ |
38 | |
39 | cat > src/Makefile <<'EOF' | |
98c916e7 | 40 | obj-m := atl2.o |
fa0fc64c | 41 | atl2-objs := at_main.o at_hw.o at_param.o at_ethtool.o kcompat.o |
98c916e7 BZ |
42 | EOF |
43 | ||
44 | %build | |
45 | %build_kernel_modules -C src -m atl2 | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
1d26bf32 | 49 | %install_kernel_modules -m src/atl2 -d kernel/drivers/net |
98c916e7 BZ |
50 | |
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %post | |
55 | %depmod %{_kernel_ver} | |
56 | ||
57 | %postun | |
58 | %depmod %{_kernel_ver} | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %doc atl2.7 COPYING readme release_note.txt ldistrib.txt | |
16e8464c | 63 | #/etc/modprobe.d/%{_kernel_ver}/atl2.conf |
98c916e7 | 64 | /lib/modules/%{_kernel_ver}/kernel/drivers/net/atl2*.ko* |