]>
Commit | Line | Data |
---|---|---|
1 | Summary: VPD/hardware inventory utilities for Linux | |
2 | Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa | |
3 | Name: lsvpd | |
4 | Version: 1.0.3 | |
5 | Release: 4 | |
6 | License: GPL | |
7 | Group: Applications/System | |
8 | Source0: http://dl.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz | |
9 | # Source0-md5: 5d6cc395deeab1bb926a2f973d4cad1d | |
10 | Patch0: %{name}-make.patch | |
11 | URL: http://linux-diag.sourceforge.net/Lsvpd.html | |
12 | BuildRequires: autoconf | |
13 | BuildRequires: automake | |
14 | BuildRequires: db-cxx-devel >= 4.2 | |
15 | BuildRequires: libstdc++-devel | |
16 | BuildRequires: libtool | |
17 | BuildRequires: rpmbuild(macros) >= 1.268 | |
18 | BuildRequires: sg3_utils-devel | |
19 | BuildRequires: zlib-devel | |
20 | Requires(post,preun): /sbin/chkconfig | |
21 | Requires(post): /sbin/ldconfig | |
22 | Requires: rc-scripts | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %define _exec_prefix / | |
26 | %define _libdir /usr/%{_lib} | |
27 | %define _sbindir /sbin | |
28 | ||
29 | %description | |
30 | The lsvpd package contains both the lsvpd, lscfg and lsmcode commands. | |
31 | These commands, along with a boot-time scanning script called | |
32 | update-device-tree, constitute a simple hardware inventory system. The | |
33 | lsvpd command provides Vital Product Data (VPD) about hardware | |
34 | components to higher-level serviceability tools. The lscfg command | |
35 | provides a more human-readable format of the VPD, as well as some | |
36 | system-specific information. lsmcode lists microcode and firmware | |
37 | levels. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one, | |
41 | wraz z uruchamianym przy starcie systemu skryptem update-device-tree, | |
42 | prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD | |
43 | (Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego | |
44 | poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka | |
45 | postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode | |
46 | wypisuje poziomy mikrokodu i firmware'u. | |
47 | ||
48 | %package devel | |
49 | Summary: Header files for vpd library | |
50 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki vpd | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description devel | |
55 | Header files for vpd library. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe biblioteki vpd. | |
59 | ||
60 | %package static | |
61 | Summary: Static vpd library | |
62 | Summary(pl.UTF-8): Statyczna biblioteka vpd | |
63 | Group: Development/Libraries | |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static vpd library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Statyczna biblioteka vpd. | |
71 | ||
72 | %prep | |
73 | %setup -q | |
74 | %patch0 -p1 | |
75 | ||
76 | %build | |
77 | %{__libtoolize} | |
78 | %{__aclocal} | |
79 | %{__autoconf} | |
80 | %{__autoheader} | |
81 | %{__automake} | |
82 | %configure | |
83 | %{__make} LIBDB=-ldb_cxx-4.6 | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %{__make} install \ | |
89 | DESTDIR=$RPM_BUILD_ROOT | |
90 | ||
91 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
92 | install vpdupdater $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater | |
93 | ||
94 | install -d $RPM_BUILD_ROOT/%{_lib} | |
95 | mv -f $RPM_BUILD_ROOT%{_libdir}/libvpd-1.0.so.*.*.* $RPM_BUILD_ROOT/%{_lib} | |
96 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo libvpd-1.0.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libvpd-1.0.so | |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %post | |
102 | /sbin/ldconfig | |
103 | /sbin/chkconfig --add vpdupdater | |
104 | ||
105 | %postun -p /sbin/ldconfig | |
106 | ||
107 | %preun | |
108 | if [ "$1" = "0" ] ; then | |
109 | /sbin/chkconfig --del vpdupdater | |
110 | fi | |
111 | ||
112 | %triggerpostun -- lsvpd < 1.0.0 | |
113 | /sbin/chkconfig --del lsvpd | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc NEWS README TODO docs/*.html | |
118 | %attr(755,root,root) /sbin/lscfg | |
119 | %attr(755,root,root) /sbin/lsmcode | |
120 | %attr(755,root,root) /sbin/lsvio | |
121 | %attr(755,root,root) /sbin/lsvpd | |
122 | %attr(755,root,root) /sbin/vpdupdate | |
123 | %attr(755,root,root) /%{_lib}/libvpd-1.0.so.*.*.* | |
124 | %attr(754,root,root) /etc/rc.d/init.d/vpdupdater | |
125 | %{_mandir}/man8/lscfg.8* | |
126 | %{_mandir}/man8/lsmcode.8* | |
127 | %{_mandir}/man8/lsvio.8* | |
128 | %{_mandir}/man8/lsvpd.8* | |
129 | %{_mandir}/man8/vpdupdate.8* | |
130 | ||
131 | %files devel | |
132 | %defattr(644,root,root,755) | |
133 | %attr(755,root,root) %{_libdir}/libvpd-1.0.so | |
134 | %{_libdir}/libvpd-1.0.la | |
135 | %{_includedir}/libvpd-1 | |
136 | ||
137 | %files static | |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libvpd-1.0.a |