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