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