]> git.pld-linux.org Git - packages/lin_tape.git/blame - lin_tape.spec
- updated kernel module build system
[packages/lin_tape.git] / lin_tape.spec
CommitLineData
b5818c49
JR
1#
2# Conditional build:
b5818c49 3%bcond_with verbose # verbose build (V=1)
d7fb0fa1 4
d7fb0fa1
JR
5# nothing to be placed to debuginfo package
6%define _enable_debug_packages 0
7
f2747b63 8%define rel 1
b5818c49
JR
9%define pname lin_tape
10Summary: IBM Tape SCSI Device Driver for Linux
11Name: %{pname}%{_alt_kernel}
f22409b6 12Version: 2.9.1
d7fb0fa1 13Release: %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
b5818c49
JR
14License: GPL v2/LGPL
15Group: Base/Kernel
16Source0: %{pname}-%{version}.tgz
f22409b6 17# Source0-md5: 305d2922f942a73f0f0b30fa49b92dd5
b5818c49 18Patch0: use-module-dir.patch
dbbe8553 19Patch1: linux-3.10.patch
f2747b63 20Patch2: insecure-perms.patch
b5818c49
JR
21# System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
22URL: http://www.ibm.com/support/fixcentral/
616d29c6
JR
23BuildRequires: rpmbuild(macros) >= 1.701
24%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
b5818c49
JR
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28The IBM Tape Device Driver, lin_tape, product is a device driver that
29provides attachment for the IBM TotalStorage and System Storage tape
30devices to Linux compatible platforms.
31
d7fb0fa1
JR
32%define kernel_pkg()\
33%package -n kernel%{_alt_kernel}-scsi-lin_tape\
34Summary: IBM Tape SCSI Device Driver for Linux\
35Release: %{rel}@%{_kernel_ver_str}\
36Group: Base/Kernel\
37Requires(post,postun): /sbin/depmod\
d7fb0fa1
JR
38%requires_releq_kernel\
39Requires(postun): %releq_kernel\
d7fb0fa1
JR
40\
41%description -n kernel%{_alt_kernel}-scsi-lin_tape\
42The IBM Tape Device Driver is a device driver that provides attachment\
43for the IBM TotalStorage and System Storage tape devices to Linux\
44compatible platforms.\
45\
46%post -n kernel%{_alt_kernel}-scsi-lin_tape\
47%depmod %{_kernel_ver}\
48\
49%postun -n kernel%{_alt_kernel}-scsi-lin_tape\
50%depmod %{_kernel_ver}\
51\
52%files -n kernel%{_alt_kernel}-scsi-lin_tape\
53%defattr(644,root,root,755)\
54%doc lin_tape.fixlist lin_tape_Ultrium.ReadMe lin_tape_359X.ReadMe\
55/lib/modules/%{_kernel_ver}/kernel/drivers/scsi/lin_tape.ko*\
56%{nil}
b5818c49 57
d7fb0fa1
JR
58%define build_kernel_pkg()\
59%build_kernel_modules -m lin_tape\
60%install_kernel_modules -D installed -m lin_tape -d kernel/drivers/scsi\
61%{nil}
62
616d29c6 63%{expand:%create_kernel_packages}
b5818c49
JR
64
65%prep
66%setup -q -n %{pname}-%{version}
67%patch0 -p1
dbbe8553 68%patch1 -p1
f2747b63 69%patch2 -p1
b5818c49
JR
70%ifarch %ix86 ia64
71proc="Intel"
72%endif
73%ifarch %x8664
74proc="AMD"
75%endif
76%ifarch ppc ppc64 powerpc powerpc64
77proc="pSeries"
78%endif
79%ifarch s390 s390x
80proc="zSeries"
81%endif
82
83%{__cp} -af lin_tape_359X_${proc}.ReadMe lin_tape_359X.ReadMe
84%{__cp} -af lin_tape_Ultrium_${proc}.ReadMe lin_tape_Ultrium.ReadMe
85
86%{__mv} Makefile Makefile.IBM
87%{__cp} -af Makefile.GPL Makefile
88
89%build
616d29c6 90%{expand:%build_kernel_packages}
b5818c49
JR
91
92%install
93rm -rf $RPM_BUILD_ROOT
d7fb0fa1 94install -d $RPM_BUILD_ROOT
b5818c49 95
d7fb0fa1 96cp -a installed/* $RPM_BUILD_ROOT
b5818c49
JR
97
98%clean
99rm -rf $RPM_BUILD_ROOT
This page took 0.059463 seconds and 4 git commands to generate.