X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=lin_tape.spec;h=0ca9f76760caa9638499013da13f217fc7d6da55;hb=cb517b2893bd0d98fc629346050fabf0cb929e64;hp=2344b0bdba7f118455d4f1eafa053eb565d2955f;hpb=d17809c6261d13563960fea71b4d8c4e9d97ef92;p=packages%2Flin_tape.git diff --git a/lin_tape.spec b/lin_tape.spec index 2344b0b..0ca9f76 100644 --- a/lin_tape.spec +++ b/lin_tape.spec @@ -1,23 +1,28 @@ # # Conditional build: -%bcond_without dist_kernel # allow non-distribution kernel %bcond_with verbose # verbose build (V=1) -# -%define rel 7 + +# nothing to be placed to debuginfo package +%define _enable_debug_packages 0 + +%define rel 0.1 %define pname lin_tape Summary: IBM Tape SCSI Device Driver for Linux Name: %{pname}%{_alt_kernel} -Version: 1.74.0 -Release: %{rel} +Version: 3.0.8 +Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}} License: GPL v2/LGPL Group: Base/Kernel Source0: %{pname}-%{version}.tgz -# Source0-md5: 675822326c2b12390b5164a4e2b14aec +# Source0-md5: 11a219f7b32496d9c334bbcd534da349 +Source1: %{pname}.fixlist Patch0: use-module-dir.patch +Patch1: linux-3.19.patch +Patch2: insecure-perms.patch # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux) URL: http://www.ibm.com/support/fixcentral/ -%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} -BuildRequires: rpmbuild(macros) >= 1.379 +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 @@ -25,28 +30,48 @@ The IBM Tape Device Driver, lin_tape, product is a device driver that provides attachment for the IBM TotalStorage and System Storage tape devices to Linux compatible platforms. -%package -n kernel%{_alt_kernel}-scsi-lin_tape -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 +%define kernel_pkg()\ +%package -n kernel%{_alt_kernel}-scsi-lin_tape\ +Summary: IBM Tape SCSI Device Driver for Linux\ +Release: %{rel}@%{_kernel_ver_str}\ +Group: Base/Kernel\ +Requires(post,postun): /sbin/depmod\ +%requires_releq_kernel\ +Requires(postun): %releq_kernel\ +\ +%description -n kernel%{_alt_kernel}-scsi-lin_tape\ +The IBM Tape Device Driver is a device driver that provides attachment\ +for the IBM TotalStorage and System Storage tape devices to Linux\ +compatible platforms.\ +\ +%post -n kernel%{_alt_kernel}-scsi-lin_tape\ +%depmod %{_kernel_ver}\ +\ +%postun -n kernel%{_alt_kernel}-scsi-lin_tape\ +%depmod %{_kernel_ver}\ +\ +%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\ +/lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*\ +%{nil} -%description -n kernel%{_alt_kernel}-scsi-lin_tape -The IBM Tape Device Driver, lin_tape, product is a device driver that -provides attachment for the IBM TotalStorage and System Storage tape -devices to Linux compatible platforms. +%define build_kernel_pkg()\ +%build_kernel_modules -m lin_tape\ +%install_kernel_modules -D installed -m lin_tape -d kernel/drivers/scsi\ +%{nil} + +%{expand:%create_kernel_packages} %prep %setup -q -n %{pname}-%{version} %patch0 -p1 -%ifarch %ix86 ia64 +%patch1 -p1 +%patch2 -p1 +%ifarch %{ix86} ia64 proc="Intel" %endif -%ifarch %x8664 +%ifarch %{x8664} x32 proc="AMD" %endif %ifarch ppc ppc64 powerpc powerpc64 @@ -63,23 +88,13 @@ proc="zSeries" %{__cp} -af Makefile.GPL Makefile %build -%build_kernel_modules -m lin_tape +%{expand:%build_kernel_packages} %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT -%install_kernel_modules -m lin_tape -d kernel/drivers/scsi +cp -a installed/* $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT - -%post -n kernel%{_alt_kernel}-scsi-lin_tape -%depmod %{_kernel_ver} - -%postun -n kernel%{_alt_kernel}-scsi-lin_tape -%depmod %{_kernel_ver} - -%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 -/lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*