]> git.pld-linux.org Git - packages/lin_tape.git/blobdiff - lin_tape.spec
- fix building with kernel 4.17
[packages/lin_tape.git] / lin_tape.spec
index 06eba4a3cedd24a6a83c2b0b3d067a1767a83035..2c13a8b816ef0a0d8c6f803ae9340482f7bb71ec 100644 (file)
@@ -1,42 +1,35 @@
 #
 # Conditional build:
-%bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_with    verbose         # verbose build (V=1)
 
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%global                _build_kernels          %{alt_kernel}
-%else
-%global                _build_kernels          %{?build_kernels:,%{?build_kernels}}
-%endif
-
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                kbrs    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
-%define                kpkg    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
-%define                bkpkg   %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
-
-%define                rel     1
+%define                rel     2
 %define                pname   lin_tape
 Summary:       IBM Tape SCSI Device Driver for Linux
 Name:          %{pname}%{_alt_kernel}
-Version:       2.9.1
+Version:       3.0.23
 Release:       %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
 License:       GPL v2/LGPL
 Group:         Base/Kernel
 Source0:       %{pname}-%{version}.tgz
-# Source0-md5: 305d2922f942a73f0f0b30fa49b92dd5
+# Source0-md5: 38edd3855f4205250cb725df6a8ef2a3
+Source1:       %{pname}.fixlist
 Patch0:                use-module-dir.patch
-Patch1:                linux-3.10.patch
-Patch2:                insecure-perms.patch
+Patch1:                clean-ifdefs.patch
+Patch2:                linux-4.9.patch
+Patch3:                linux-4.10.patch
+Patch4:                linux-4.11.patch
+Patch5:                linux-4.12.patch
+Patch6:                linux-4.13.patch
+Patch7:                kernel-4.14.patch
+Patch8:                kernel-4.15.patch
+Patch9:                kernel-4.17.patch
 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
 URL:           http://www.ibm.com/support/fixcentral/
-BuildRequires: rpmbuild(macros) >= 1.678
-%{?with_dist_kernel:%{expand:%kbrs}}
+BuildRequires: rpmbuild(macros) >= 1.701
+%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -50,10 +43,8 @@ Summary:     IBM Tape SCSI Device Driver for Linux\
 Release:       %{rel}@%{_kernel_ver_str}\
 Group:         Base/Kernel\
 Requires(post,postun): /sbin/depmod\
-%if %{with dist_kernel}\
 %requires_releq_kernel\
 Requires(postun):      %releq_kernel\
-%endif\
 \
 %description -n kernel%{_alt_kernel}-scsi-lin_tape\
 The IBM Tape Device Driver is a device driver that provides attachment\
@@ -68,7 +59,7 @@ compatible platforms.\
 \
 %files -n kernel%{_alt_kernel}-scsi-lin_tape\
 %defattr(644,root,root,755)\
-%doc lin_tape.fixlist lin_tape_Ultrium.ReadMe lin_tape_359X.ReadMe\
+%doc lin_tape.fixlist lin_tape.ReadMe\
 /lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*\
 %{nil}
 
@@ -77,34 +68,26 @@ compatible platforms.\
 %install_kernel_modules -D installed -m lin_tape -d kernel/drivers/scsi\
 %{nil}
 
-%{expand:%kpkg}
+%{expand:%create_kernel_packages}
 
 %prep
 %setup -q -n %{pname}-%{version}
+%undos Makefile
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%ifarch %ix86 ia64
-proc="Intel"
-%endif
-%ifarch %x8664
-proc="AMD"
-%endif
-%ifarch ppc ppc64 powerpc powerpc64
-proc="pSeries"
-%endif
-%ifarch s390 s390x
-proc="zSeries"
-%endif
-
-%{__cp} -af lin_tape_359X_${proc}.ReadMe lin_tape_359X.ReadMe
-%{__cp} -af lin_tape_Ultrium_${proc}.ReadMe lin_tape_Ultrium.ReadMe
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
 
-%{__mv} Makefile Makefile.IBM
-%{__cp} -af Makefile.GPL Makefile
+install -p %{SOURCE1} .
 
 %build
-%{expand:%bkpkg}
+%{expand:%build_kernel_packages}
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.050129 seconds and 4 git commands to generate.