3 %bcond_with verbose # verbose build (V=1)
5 # nothing to be placed to debuginfo package
6 %define _enable_debug_packages 0
10 Summary: IBM Tape SCSI Device Driver for Linux
11 Name: %{pname}%{_alt_kernel}
13 Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
16 Source0: %{pname}-%{version}.tgz
17 # Source0-md5: 75cba1cbb76359085dedb5366afa7683
18 Source1: %{pname}.fixlist
19 Patch0: use-module-dir.patch
20 Patch1: clean-ifdefs.patch
21 Patch2: kernel-5.0.patch
22 Patch3: kernel-5.6.patch
23 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
24 URL: http://www.ibm.com/support/fixcentral/
25 BuildRequires: rpmbuild(macros) >= 1.701
26 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The IBM Tape Device Driver, lin_tape, product is a device driver that
31 provides attachment for the IBM TotalStorage and System Storage tape
32 devices to Linux compatible platforms.
35 %package -n kernel%{_alt_kernel}-scsi-lin_tape\
36 Summary: IBM Tape SCSI Device Driver for Linux\
37 Release: %{rel}@%{_kernel_ver_str}\
39 Requires(post,postun): /sbin/depmod\
40 %requires_releq_kernel\
41 Requires(postun): %releq_kernel\
43 %description -n kernel%{_alt_kernel}-scsi-lin_tape\
44 The IBM Tape Device Driver is a device driver that provides attachment\
45 for the IBM TotalStorage and System Storage tape devices to Linux\
46 compatible platforms.\
48 %post -n kernel%{_alt_kernel}-scsi-lin_tape\
49 %depmod %{_kernel_ver}\
51 %postun -n kernel%{_alt_kernel}-scsi-lin_tape\
52 %depmod %{_kernel_ver}\
54 %files -n kernel%{_alt_kernel}-scsi-lin_tape\
55 %defattr(644,root,root,755)\
56 %doc lin_tape.fixlist lin_tape.ReadMe\
57 /lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*\
60 %define build_kernel_pkg()\
61 %build_kernel_modules -m lin_tape\
62 %install_kernel_modules -D installed -m lin_tape -d kernel/drivers/scsi\
65 %{expand:%create_kernel_packages}
68 %setup -q -n %{pname}-%{version}
75 install -p %{SOURCE1} .
78 %{expand:%build_kernel_packages}
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT
84 cp -a installed/* $RPM_BUILD_ROOT
87 rm -rf $RPM_BUILD_ROOT