]> TLD Linux GIT Repositories - packages/sg3_utils.git/blob - sg3_utils.spec
- missing patch
[packages/sg3_utils.git] / sg3_utils.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        Utilities and test programs for the Linux sg version 3 device driver
6 Summary(pl.UTF-8):      Programy narzędziowe i testowe dla linuksowego sterownika sg w wersji 3
7 Name:           sg3_utils
8 Version:        1.48
9 Release:        1
10 License:        GPL v2 (utilities), BSD (library)
11 Group:          Applications/System
12 Source0:        http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
13 # Source0-md5:  0024393d2d2942cc081ce613d98db68a
14 Patch0:         %{name}-rescan-scsi-bus.sh.patch
15 URL:            http://sg.danny.cz/sg/sg3_utils.html
16 BuildRequires:  rpmbuild(macros) >= 1.527
17 BuildRequires:  tar >= 1:1.22
18 BuildRequires:  xz
19 # see scripts/rescan-scsi-bus.sh /Id:
20 Provides:       rescan-scsi-bus = 1.57
21 Provides:       sg_utils
22 Obsoletes:      rescan-scsi-bus < 1.57
23 Obsoletes:      scsiutils < 1.8
24 Obsoletes:      sg_utils < 1.03
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %undefine       __cxx
28
29 %description
30 This package contains some utilities and test programs for the Linux
31 sg (version 3) device driver. This driver is found in the Linux 2.4+
32 kernels.
33
34 %description -l pl.UTF-8
35 Ten pakiet zawiera trochę programów narzędziowych i testowych dla
36 sterownika urządzeń sg w wersji 3. Ten sterownik jest obecny w jądrach
37 Linuksa 2.4+.
38
39 %package devel
40 Summary:        Header files for sgutils2 library
41 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki sgutils2
42 License:        BSD
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}-%{release}
45
46 %description devel
47 Header files for sgutils2 library.
48
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki sgutils2.
51
52 %package static
53 Summary:        Static sgutils2 library
54 Summary(pl.UTF-8):      Statyczna biblioteka sgutils2
55 License:        BSD
56 Group:          Development/Libraries
57 Requires:       %{name}-devel = %{version}-%{release}
58
59 %description static
60 Static version of sgutils2 library.
61
62 %description static -l pl.UTF-8
63 Statyczna wersja biblioteki sgutils2.
64
65 %package udev
66 Summary:        Udev rules for sg3_utils
67 Summary(pl.UTF-8):      Reguły udev dla sg3_utils
68 License:        BSD
69 Group:          Applications/System
70 Requires:       %{name} = %{version}-%{release}
71
72 %description udev
73 Udev rules for sg3_utils.
74
75 %description udev -l pl.UTF-8
76 Reguły udev dla sg3_utils
77
78 %prep
79 %setup -q
80
81 cp -p scripts/README README.scripts
82
83 %build
84 %configure \
85         %{__enable_disable static_libs static}
86 %{__make}
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %{__make} install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install scripts/rescan-scsi-bus.sh $RPM_BUILD_ROOT%{_bindir}
95
96 install -d $RPM_BUILD_ROOT/lib/udev/rules.d
97 install scripts/*.rules $RPM_BUILD_ROOT/lib/udev/rules.d
98
99 # no external dependencies
100 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsgutils2.la
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post   -p /sbin/ldconfig
106 %postun -p /sbin/ldconfig
107
108 %files
109 %defattr(644,root,root,755)
110 %doc AUTHORS BSD_LICENSE COPYING COVERAGE CREDITS ChangeLog README README.scripts README.sg_start
111 %attr(755,root,root) %{_bindir}/rescan-scsi-bus.sh
112 %attr(755,root,root) %{_bindir}/scsi_*
113 %attr(755,root,root) %{_bindir}/sg_*
114 %attr(755,root,root) %{_bindir}/sginfo
115 %attr(755,root,root) %{_bindir}/sgm_dd
116 %attr(755,root,root) %{_bindir}/sgp_dd
117 %attr(755,root,root) %{_libdir}/libsgutils2-%{version}.so.*.*.*
118 %attr(755,root,root) %ghost %{_libdir}/libsgutils2-%{version}.so.2
119 %{_mandir}/man8/rescan-scsi-bus.sh.8*
120 %{_mandir}/man8/scsi_*.8*
121 %{_mandir}/man8/sg3_utils.8*
122 %{_mandir}/man8/sg3_utils_json.8*
123 %{_mandir}/man8/sg_*.8*
124 %{_mandir}/man8/sginfo.8*
125 %{_mandir}/man8/sgm_dd.8*
126 %{_mandir}/man8/sgp_dd.8*
127
128 %files devel
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_libdir}/libsgutils2.so
131 %{_includedir}/scsi/sg_*.h
132
133 %if %{with static_libs}
134 %files static
135 %defattr(644,root,root,755)
136 %{_libdir}/libsgutils2.a
137 %endif
138
139 %files udev
140 %defattr(644,root,root,755)
141 /lib/udev/rules.d/00-scsi-sg3_config.rules
142 /lib/udev/rules.d/40-usb-blacklist.rules
143 /lib/udev/rules.d/54-before-scsi-sg3_id.rules
144 /lib/udev/rules.d/55-scsi-sg3_id.rules
145 /lib/udev/rules.d/58-scsi-sg3_symlink.rules
146 /lib/udev/rules.d/59-fc-wwpn-id.rules
147 /lib/udev/rules.d/59-scsi-cciss_id.rules