]>
Commit | Line | Data |
---|---|---|
b5818c49 JR |
1 | # |
2 | # Conditional build: | |
b5818c49 | 3 | %bcond_with verbose # verbose build (V=1) |
d7fb0fa1 | 4 | |
d7fb0fa1 JR |
5 | # nothing to be placed to debuginfo package |
6 | %define _enable_debug_packages 0 | |
7 | ||
ba88ce5c | 8 | %define rel 3 |
b5818c49 JR |
9 | %define pname lin_tape |
10 | Summary: IBM Tape SCSI Device Driver for Linux | |
11 | Name: %{pname}%{_alt_kernel} | |
9752ce8d | 12 | Version: 3.0.20 |
d7fb0fa1 | 13 | Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}} |
b5818c49 JR |
14 | License: GPL v2/LGPL |
15 | Group: Base/Kernel | |
16 | Source0: %{pname}-%{version}.tgz | |
9752ce8d | 17 | # Source0-md5: e9780677ade7969498032f10611a3bb6 |
cb517b28 | 18 | Source1: %{pname}.fixlist |
b5818c49 | 19 | Patch0: use-module-dir.patch |
6986ddb6 | 20 | Patch1: clean-ifdefs.patch |
300a759d JR |
21 | Patch2: linux-4.9.patch |
22 | Patch3: linux-4.10.patch | |
23 | Patch4: linux-4.11.patch | |
9752ce8d | 24 | Patch5: linux-4.12.patch |
e63c79d8 | 25 | Patch6: linux-4.13.patch |
ba88ce5c | 26 | Patch7: kernel-4.14.patch |
b5818c49 JR |
27 | # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux) |
28 | URL: http://www.ibm.com/support/fixcentral/ | |
616d29c6 JR |
29 | BuildRequires: rpmbuild(macros) >= 1.701 |
30 | %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
b5818c49 JR |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | The IBM Tape Device Driver, lin_tape, product is a device driver that | |
35 | provides attachment for the IBM TotalStorage and System Storage tape | |
36 | devices to Linux compatible platforms. | |
37 | ||
d7fb0fa1 JR |
38 | %define kernel_pkg()\ |
39 | %package -n kernel%{_alt_kernel}-scsi-lin_tape\ | |
40 | Summary: IBM Tape SCSI Device Driver for Linux\ | |
41 | Release: %{rel}@%{_kernel_ver_str}\ | |
42 | Group: Base/Kernel\ | |
43 | Requires(post,postun): /sbin/depmod\ | |
d7fb0fa1 JR |
44 | %requires_releq_kernel\ |
45 | Requires(postun): %releq_kernel\ | |
d7fb0fa1 JR |
46 | \ |
47 | %description -n kernel%{_alt_kernel}-scsi-lin_tape\ | |
48 | The IBM Tape Device Driver is a device driver that provides attachment\ | |
49 | for the IBM TotalStorage and System Storage tape devices to Linux\ | |
50 | compatible platforms.\ | |
51 | \ | |
52 | %post -n kernel%{_alt_kernel}-scsi-lin_tape\ | |
53 | %depmod %{_kernel_ver}\ | |
54 | \ | |
55 | %postun -n kernel%{_alt_kernel}-scsi-lin_tape\ | |
56 | %depmod %{_kernel_ver}\ | |
57 | \ | |
58 | %files -n kernel%{_alt_kernel}-scsi-lin_tape\ | |
59 | %defattr(644,root,root,755)\ | |
6986ddb6 | 60 | %doc lin_tape.fixlist lin_tape.ReadMe\ |
d7fb0fa1 JR |
61 | /lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*\ |
62 | %{nil} | |
b5818c49 | 63 | |
d7fb0fa1 JR |
64 | %define build_kernel_pkg()\ |
65 | %build_kernel_modules -m lin_tape\ | |
66 | %install_kernel_modules -D installed -m lin_tape -d kernel/drivers/scsi\ | |
67 | %{nil} | |
68 | ||
616d29c6 | 69 | %{expand:%create_kernel_packages} |
b5818c49 JR |
70 | |
71 | %prep | |
72 | %setup -q -n %{pname}-%{version} | |
6986ddb6 | 73 | %undos Makefile |
b5818c49 | 74 | %patch0 -p1 |
dbbe8553 | 75 | %patch1 -p1 |
f2747b63 | 76 | %patch2 -p1 |
6986ddb6 JR |
77 | %patch3 -p1 |
78 | %patch4 -p1 | |
9752ce8d | 79 | %patch5 -p1 |
e63c79d8 | 80 | %patch6 -p1 |
ba88ce5c | 81 | %patch7 -p1 |
b5818c49 | 82 | |
6986ddb6 | 83 | install -p %{SOURCE1} . |
b5818c49 JR |
84 | |
85 | %build | |
616d29c6 | 86 | %{expand:%build_kernel_packages} |
b5818c49 JR |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
d7fb0fa1 | 90 | install -d $RPM_BUILD_ROOT |
b5818c49 | 91 | |
d7fb0fa1 | 92 | cp -a installed/* $RPM_BUILD_ROOT |
b5818c49 JR |
93 | |
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT |