3 %bcond_without dist_kernel # allow non-distribution kernel
4 %bcond_with verbose # verbose build (V=1)
8 Summary: IBM Tape SCSI Device Driver for Linux
9 Name: %{pname}%{_alt_kernel}
14 Source0: %{pname}-%{version}.tgz
15 # Source0-md5: a46993ee41fb438ae3b35249fe2c376f
16 Patch0: use-module-dir.patch
17 Patch1: linux-3.10.patch
18 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
19 URL: http://www.ibm.com/support/fixcentral/
20 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
21 BuildRequires: rpmbuild(macros) >= 1.379
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 The IBM Tape Device Driver, lin_tape, product is a device driver that
26 provides attachment for the IBM TotalStorage and System Storage tape
27 devices to Linux compatible platforms.
29 %package -n kernel%{_alt_kernel}-scsi-lin_tape
30 Summary: IBM Tape SCSI Device Driver for Linux
31 Release: %{rel}@%{_kernel_ver_str}
33 Requires(post,postun): /sbin/depmod
34 %if %{with dist_kernel}
35 %requires_releq_kernel
36 Requires(postun): %releq_kernel
39 %description -n kernel%{_alt_kernel}-scsi-lin_tape
40 The IBM Tape Device Driver is a device driver that provides attachment
41 for the IBM TotalStorage and System Storage tape devices to Linux
45 %setup -q -n %{pname}-%{version}
47 %if "%{_alt_kernel}" == "%{nil}"
56 %ifarch ppc ppc64 powerpc powerpc64
63 %{__cp} -af lin_tape_359X_${proc}.ReadMe lin_tape_359X.ReadMe
64 %{__cp} -af lin_tape_Ultrium_${proc}.ReadMe lin_tape_Ultrium.ReadMe
66 %{__mv} Makefile Makefile.IBM
67 %{__cp} -af Makefile.GPL Makefile
70 %build_kernel_modules -m lin_tape
73 rm -rf $RPM_BUILD_ROOT
75 %install_kernel_modules -m lin_tape -d kernel/drivers/scsi
78 rm -rf $RPM_BUILD_ROOT
80 %post -n kernel%{_alt_kernel}-scsi-lin_tape
81 %depmod %{_kernel_ver}
83 %postun -n kernel%{_alt_kernel}-scsi-lin_tape
84 %depmod %{_kernel_ver}
86 %files -n kernel%{_alt_kernel}-scsi-lin_tape
87 %defattr(644,root,root,755)
88 %doc lin_tape.fixlist lin_tape_Ultrium.ReadMe lin_tape_359X.ReadMe
89 /lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*