]>
Commit | Line | Data |
---|---|---|
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 19 | |
7 | %define pname lin_tape | |
8 | Summary: IBM Tape SCSI Device Driver for Linux | |
9 | Name: %{pname}%{_alt_kernel} | |
10 | Version: 1.74.0 | |
11 | Release: %{rel} | |
12 | License: GPL v2/LGPL | |
13 | Group: Base/Kernel | |
14 | Source0: %{pname}-%{version}.tgz | |
15 | # Source0-md5: 675822326c2b12390b5164a4e2b14aec | |
16 | Patch0: use-module-dir.patch | |
17 | # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux) | |
18 | URL: http://www.ibm.com/support/fixcentral/ | |
19 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
20 | BuildRequires: rpmbuild(macros) >= 1.379 | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | The IBM Tape Device Driver, lin_tape, product is a device driver that | |
25 | provides attachment for the IBM TotalStorage and System Storage tape | |
26 | devices to Linux compatible platforms. | |
27 | ||
28 | %package -n kernel%{_alt_kernel}-scsi-lin_tape | |
29 | Summary: IBM Tape SCSI Device Driver for Linux | |
30 | Release: %{rel}@%{_kernel_ver_str} | |
31 | Group: Base/Kernel | |
32 | Requires(post,postun): /sbin/depmod | |
33 | %if %{with dist_kernel} | |
34 | %requires_releq_kernel | |
35 | Requires(postun): %releq_kernel | |
36 | %endif | |
37 | ||
38 | %description -n kernel%{_alt_kernel}-scsi-lin_tape | |
39 | The IBM Tape Device Driver, lin_tape, product is a device driver that | |
40 | provides attachment for the IBM TotalStorage and System Storage tape | |
41 | devices to Linux compatible platforms. | |
42 | ||
43 | %prep | |
44 | %setup -q -n %{pname}-%{version} | |
45 | %patch0 -p1 | |
46 | %ifarch %ix86 ia64 | |
47 | proc="Intel" | |
48 | %endif | |
49 | %ifarch %x8664 | |
50 | proc="AMD" | |
51 | %endif | |
52 | %ifarch ppc ppc64 powerpc powerpc64 | |
53 | proc="pSeries" | |
54 | %endif | |
55 | %ifarch s390 s390x | |
56 | proc="zSeries" | |
57 | %endif | |
58 | ||
59 | %{__cp} -af lin_tape_359X_${proc}.ReadMe lin_tape_359X.ReadMe | |
60 | %{__cp} -af lin_tape_Ultrium_${proc}.ReadMe lin_tape_Ultrium.ReadMe | |
61 | ||
62 | %{__mv} Makefile Makefile.IBM | |
63 | %{__cp} -af Makefile.GPL Makefile | |
64 | ||
65 | %build | |
66 | %build_kernel_modules -m lin_tape | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %install_kernel_modules -m lin_tape -d kernel/drivers/scsi | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %post -n kernel%{_alt_kernel}-scsi-lin_tape | |
77 | %depmod %{_kernel_ver} | |
78 | ||
79 | %postun -n kernel%{_alt_kernel}-scsi-lin_tape | |
80 | %depmod %{_kernel_ver} | |
81 | ||
82 | %files -n kernel%{_alt_kernel}-scsi-lin_tape | |
83 | %defattr(644,root,root,755) | |
84 | %doc lin_tape.fixlist lin_tape_Ultrium.ReadMe lin_tape_359X.ReadMe | |
85 | /lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko* |