]>
Commit | Line | Data |
---|---|---|
a6b33d7b | 1 | Summary: VPD/hardware inventory utilities for Linux |
40312222 | 2 | Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa |
a6b33d7b | 3 | Name: lsvpd |
3ff35f2f | 4 | Version: 1.0.3 |
25c075e8 | 5 | Release: 4 |
a6b33d7b JB |
6 | License: GPL |
7 | Group: Applications/System | |
8 | Source0: http://dl.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz | |
3ff35f2f JB |
9 | # Source0-md5: 5d6cc395deeab1bb926a2f973d4cad1d |
10 | Patch0: %{name}-make.patch | |
27f7840e | 11 | URL: http://linux-diag.sourceforge.net/Lsvpd.html |
3ff35f2f JB |
12 | BuildRequires: autoconf |
13 | BuildRequires: automake | |
14 | BuildRequires: db-cxx-devel >= 4.2 | |
15 | BuildRequires: libstdc++-devel | |
16 | BuildRequires: libtool | |
11297fa9 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
3ff35f2f JB |
18 | BuildRequires: sg3_utils-devel |
19 | BuildRequires: zlib-devel | |
a6b33d7b | 20 | Requires(post,preun): /sbin/chkconfig |
3ff35f2f | 21 | Requires(post): /sbin/ldconfig |
00f47270 | 22 | Requires: rc-scripts |
a6b33d7b JB |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
3ff35f2f JB |
25 | %define _exec_prefix / |
26 | %define _libdir /usr/%{_lib} | |
27 | %define _sbindir /sbin | |
28 | ||
a6b33d7b JB |
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 | ||
a018b7aa JR |
39 | %description -l pl.UTF-8 |
40 | Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one, | |
a6b33d7b | 41 | wraz z uruchamianym przy starcie systemu skryptem update-device-tree, |
a018b7aa JR |
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 | |
a6b33d7b JB |
46 | wypisuje poziomy mikrokodu i firmware'u. |
47 | ||
3ff35f2f JB |
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 | ||
a6b33d7b JB |
72 | %prep |
73 | %setup -q | |
30c21f0a | 74 | %patch0 -p1 |
a6b33d7b JB |
75 | |
76 | %build | |
3ff35f2f JB |
77 | %{__libtoolize} |
78 | %{__aclocal} | |
79 | %{__autoconf} | |
80 | %{__autoheader} | |
81 | %{__automake} | |
82 | %configure | |
2af74028 | 83 | %{__make} LIBDB=-ldb_cxx-4.6 |
a6b33d7b JB |
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 | |
3ff35f2f | 92 | install vpdupdater $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater |
a6b33d7b | 93 | |
3ff35f2f JB |
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 | |
a6b33d7b | 97 | |
8706ca9d JB |
98 | %clean |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
a6b33d7b | 101 | %post |
3ff35f2f JB |
102 | /sbin/ldconfig |
103 | /sbin/chkconfig --add vpdupdater | |
104 | ||
105 | %postun -p /sbin/ldconfig | |
a6b33d7b JB |
106 | |
107 | %preun | |
108 | if [ "$1" = "0" ] ; then | |
3ff35f2f | 109 | /sbin/chkconfig --del vpdupdater |
a6b33d7b JB |
110 | fi |
111 | ||
3ff35f2f JB |
112 | %triggerpostun -- lsvpd < 1.0.0 |
113 | /sbin/chkconfig --del lsvpd | |
114 | ||
a6b33d7b JB |
115 | %files |
116 | %defattr(644,root,root,755) | |
117 | %doc NEWS README TODO docs/*.html | |
a6b33d7b JB |
118 | %attr(755,root,root) /sbin/lscfg |
119 | %attr(755,root,root) /sbin/lsmcode | |
8706ca9d | 120 | %attr(755,root,root) /sbin/lsvio |
3ff35f2f JB |
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 |