3 %bcond_with rtas # RTAS support (PowerPC)
8 Summary: VPD/hardware inventory utilities for Linux
9 Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa
14 Group: Applications/System
15 Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
16 # Source0-md5: 6d63c45af3efbac6fbc5dd01648d0f7f
17 Source1: vpdupdater.init
18 Source2: vpdupdater.sysconfig
19 Patch0: %{name}-make.patch
20 Patch1: %{name}-nortas.patch
21 URL: http://linux-diag.sourceforge.net/Lsvpd.html
22 BuildRequires: autoconf
23 BuildRequires: automake
24 %{?with_rtas:BuildRequires: librtas-devel}
25 BuildRequires: libstdc++-devel
26 BuildRequires: libtool >= 2:2.0
27 BuildRequires: rpmbuild(macros) >= 1.268
28 BuildRequires: sg3_utils-devel
29 BuildRequires: zlib-devel
30 Requires(post,preun): /sbin/chkconfig
31 Requires(post): /sbin/ldconfig
32 Requires: /etc/pci.ids
33 Requires: /etc/usb.ids
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
39 These commands, along with a boot-time scanning script called
40 update-device-tree, constitute a simple hardware inventory system. The
41 lsvpd command provides Vital Product Data (VPD) about hardware
42 components to higher-level serviceability tools. The lscfg command
43 provides a more human-readable format of the VPD, as well as some
44 system-specific information. lsmcode lists microcode and firmware
47 %description -l pl.UTF-8
48 Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
49 wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
50 prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
51 (Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
52 poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
53 postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
54 wypisuje poziomy mikrokodu i firmware'u.
68 %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no}
72 rm -rf $RPM_BUILD_ROOT
75 DESTDIR=$RPM_BUILD_ROOT
77 install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
78 install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater
81 rm -rf $RPM_BUILD_ROOT
84 /sbin/chkconfig --add vpdupdater
86 %postun -p /sbin/ldconfig
89 if [ "$1" = "0" ] ; then
90 /sbin/chkconfig --del vpdupdater
93 %triggerpostun -- lsvpd < 1.0.0
94 /sbin/chkconfig --del lsvpd
97 %defattr(644,root,root,755)
98 %doc AUTHORS NEWS README TODO docs/*.html
99 %attr(755,root,root) %{_sbindir}/lscfg
100 %attr(755,root,root) %{_sbindir}/lsmcode
101 %attr(755,root,root) %{_sbindir}/lsvio
102 %attr(755,root,root) %{_sbindir}/lsvpd
103 %attr(755,root,root) %{_sbindir}/vpdupdate
104 %dir %{_sysconfdir}/lsvpd
105 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf
106 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf
107 %attr(754,root,root) /etc/rc.d/init.d/vpdupdater
108 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater
109 %{_mandir}/man8/lscfg.8*
110 %{_mandir}/man8/lsmcode.8*
111 %{_mandir}/man8/lsvio.8*
112 %{_mandir}/man8/lsvpd.8*
113 %{_mandir}/man8/vpdupdate.8*