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
13 License: GPL v2+ with librtas exception
14 Group: Applications/System
15 Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
16 # Source0-md5: 11c59a64c8c2d9ed691f900af32f3879
17 Source1: vpdupdater.init
18 Source2: vpdupdater.sysconfig
20 Source3: 90-vpdupdate.rules
21 Patch0: %{name}-nortas.patch
22 URL: http://linux-diag.sourceforge.net/Lsvpd.html
23 BuildRequires: autoconf >= 2.69
24 BuildRequires: automake
25 %{?with_rtas:BuildRequires: librtas-devel}
26 BuildRequires: libstdc++-devel
27 BuildRequires: libtool >= 2:2.0
28 BuildRequires: libvpd-cxx-devel >= 2.2.6
29 BuildRequires: rpmbuild(macros) >= 1.268
30 BuildRequires: sg3_utils-devel
31 BuildRequires: sqlite3-devel >= 3
32 BuildRequires: zlib-devel
33 Requires(post,preun): /sbin/chkconfig
34 Requires(post): /sbin/ldconfig
35 Requires: /lib/hwdata/pci.ids
36 Requires: /lib/hwdata/usb.ids
37 Requires: hwdata >= 0.243-5
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
43 These commands, along with a boot-time scanning script called
44 update-device-tree, constitute a simple hardware inventory system. The
45 lsvpd command provides Vital Product Data (VPD) about hardware
46 components to higher-level serviceability tools. The lscfg command
47 provides a more human-readable format of the VPD, as well as some
48 system-specific information. lsmcode lists microcode and firmware
51 %description -l pl.UTF-8
52 Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
53 wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
54 prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
55 (Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
56 poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
57 postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
58 wypisuje poziomy mikrokodu i firmware'u.
71 %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no}
75 rm -rf $RPM_BUILD_ROOT
78 DESTDIR=$RPM_BUILD_ROOT
80 install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
81 install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater
82 install -D -p %{SOURCE3} $RPM_BUILD_ROOT/lib/udev/rules.d/90-vpdupdate.rules
84 install -d $RPM_BUILD_ROOT/var/lib/lsvpd
87 rm -rf $RPM_BUILD_ROOT
90 /sbin/chkconfig --add vpdupdater
92 %postun -p /sbin/ldconfig
95 if [ "$1" = "0" ] ; then
96 /sbin/chkconfig --del vpdupdater
99 %triggerpostun -- lsvpd < 1.0.0
100 /sbin/chkconfig --del lsvpd
103 %defattr(644,root,root,755)
104 %doc AUTHORS COPYING ChangeLog NEWS README
105 %attr(755,root,root) %{_sbindir}/lscfg
106 %attr(755,root,root) %{_sbindir}/lsmcode
107 %attr(755,root,root) %{_sbindir}/lsvio
108 %attr(755,root,root) %{_sbindir}/lsvpd
109 %attr(755,root,root) %{_sbindir}/vpdupdate
110 %dir %{_sysconfdir}/lsvpd
111 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf
112 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/nvme_templates.conf
113 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf
114 %attr(754,root,root) /etc/rc.d/init.d/vpdupdater
115 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater
116 /lib/udev/rules.d/90-vpdupdate.rules
118 %{_mandir}/man8/lscfg.8*
119 %{_mandir}/man8/lsmcode.8*
120 %{_mandir}/man8/lsvio.8*
121 %{_mandir}/man8/lsvpd.8*
122 %{_mandir}/man8/vpdupdate.8*