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 #Source0Download: https://github.com/power-ras/lsvpd/tags
16 Source0: https://github.com/power-ras/lsvpd/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: 7da3af9d12a6ef5676c1f7c1f32e8238
18 Source1: vpdupdater.init
19 Source2: vpdupdater.sysconfig
21 Source3: 90-vpdupdate.rules
22 Patch0: %{name}-nortas.patch
23 Patch1: %{name}-unknown-platform.patch
24 URL: https://github.com/power-ras/lsvpd
25 BuildRequires: autoconf >= 2.69
26 BuildRequires: automake
27 %{?with_rtas:BuildRequires: librtas-devel}
28 BuildRequires: libstdc++-devel
29 BuildRequires: libtool >= 2:2.0
30 BuildRequires: libvpd-cxx-devel >= 2.2.9
31 BuildRequires: rpmbuild(macros) >= 1.268
32 BuildRequires: sg3_utils-devel
33 BuildRequires: sqlite3-devel >= 3
34 BuildRequires: zlib-devel
35 Requires(post,preun): /sbin/chkconfig
36 Requires(post): /sbin/ldconfig
37 Requires: /lib/hwdata/pci.ids
38 Requires: /lib/hwdata/usb.ids
39 Requires: hwdata >= 0.243-5
40 Requires: libvpd-cxx >= 2.2.9
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
46 These commands, along with a boot-time scanning script called
47 update-device-tree, constitute a simple hardware inventory system. The
48 lsvpd command provides Vital Product Data (VPD) about hardware
49 components to higher-level serviceability tools. The lscfg command
50 provides a more human-readable format of the VPD, as well as some
51 system-specific information. lsmcode lists microcode and firmware
54 %description -l pl.UTF-8
55 Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
56 wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
57 prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
58 (Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
59 poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
60 postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
61 wypisuje poziomy mikrokodu i firmware'u.
74 export CXXFLAGS="%{rpmcxxflags} -std=c++11"
76 %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no}
80 rm -rf $RPM_BUILD_ROOT
83 DESTDIR=$RPM_BUILD_ROOT
85 install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
86 install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater
87 install -D -p %{SOURCE3} $RPM_BUILD_ROOT/lib/udev/rules.d/90-vpdupdate.rules
89 install -d $RPM_BUILD_ROOT/var/lib/lsvpd
92 rm -rf $RPM_BUILD_ROOT
95 /sbin/chkconfig --add vpdupdater
97 %postun -p /sbin/ldconfig
100 if [ "$1" = "0" ] ; then
101 /sbin/chkconfig --del vpdupdater
104 %triggerpostun -- lsvpd < 1.0.0
105 /sbin/chkconfig --del lsvpd
108 %defattr(644,root,root,755)
109 %doc AUTHORS COPYING ChangeLog NEWS README
110 %attr(755,root,root) %{_sbindir}/lscfg
111 %attr(755,root,root) %{_sbindir}/lsmcode
112 %attr(755,root,root) %{_sbindir}/lsvio
113 %attr(755,root,root) %{_sbindir}/lsvpd
114 %attr(755,root,root) %{_sbindir}/vpdupdate
115 %dir %{_sysconfdir}/lsvpd
116 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/nvme_templates.conf
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf
119 %attr(754,root,root) /etc/rc.d/init.d/vpdupdater
120 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater
121 /lib/udev/rules.d/90-vpdupdate.rules
123 %{_mandir}/man8/lscfg.8*
124 %{_mandir}/man8/lsmcode.8*
125 %{_mandir}/man8/lsvio.8*
126 %{_mandir}/man8/lsvpd.8*
127 %{_mandir}/man8/vpdupdate.8*