]>
Commit | Line | Data |
---|---|---|
7a8d4c54 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with rtas # RTAS support (PowerPC) | |
4 | # | |
5 | %ifarch ppc ppc64 | |
6 | %define with_rtas 1 | |
7 | %endif | |
a6b33d7b | 8 | Summary: VPD/hardware inventory utilities for Linux |
40312222 | 9 | Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa |
a6b33d7b | 10 | Name: lsvpd |
ba5a68bf JB |
11 | Version: 1.7.15 |
12 | Release: 1 | |
c411a5ee | 13 | License: GPL v2+ with librtas exception |
a6b33d7b | 14 | Group: Applications/System |
ba5a68bf JB |
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 | |
7a8d4c54 JB |
18 | Source1: vpdupdater.init |
19 | Source2: vpdupdater.sysconfig | |
c411a5ee JB |
20 | # from libvpd sources |
21 | Source3: 90-vpdupdate.rules | |
22 | Patch0: %{name}-nortas.patch | |
40f0e40f | 23 | Patch1: %{name}-unknown-platform.patch |
ba5a68bf | 24 | URL: https://github.com/power-ras/lsvpd |
c411a5ee | 25 | BuildRequires: autoconf >= 2.69 |
3ff35f2f | 26 | BuildRequires: automake |
7a8d4c54 | 27 | %{?with_rtas:BuildRequires: librtas-devel} |
3ff35f2f | 28 | BuildRequires: libstdc++-devel |
7a8d4c54 | 29 | BuildRequires: libtool >= 2:2.0 |
ba5a68bf | 30 | BuildRequires: libvpd-cxx-devel >= 2.2.9 |
11297fa9 | 31 | BuildRequires: rpmbuild(macros) >= 1.268 |
3ff35f2f | 32 | BuildRequires: sg3_utils-devel |
c411a5ee | 33 | BuildRequires: sqlite3-devel >= 3 |
3ff35f2f | 34 | BuildRequires: zlib-devel |
a6b33d7b | 35 | Requires(post,preun): /sbin/chkconfig |
3ff35f2f | 36 | Requires(post): /sbin/ldconfig |
4cdb445c JB |
37 | Requires: /lib/hwdata/pci.ids |
38 | Requires: /lib/hwdata/usb.ids | |
39 | Requires: hwdata >= 0.243-5 | |
ba5a68bf | 40 | Requires: libvpd-cxx >= 2.2.9 |
00f47270 | 41 | Requires: rc-scripts |
a6b33d7b JB |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
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 | |
52 | levels. | |
53 | ||
a018b7aa JR |
54 | %description -l pl.UTF-8 |
55 | Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one, | |
a6b33d7b | 56 | wraz z uruchamianym przy starcie systemu skryptem update-device-tree, |
a018b7aa JR |
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 | |
a6b33d7b JB |
61 | wypisuje poziomy mikrokodu i firmware'u. |
62 | ||
63 | %prep | |
64 | %setup -q | |
30c21f0a | 65 | %patch0 -p1 |
40f0e40f | 66 | %patch1 -p1 |
a6b33d7b JB |
67 | |
68 | %build | |
3ff35f2f JB |
69 | %{__libtoolize} |
70 | %{__aclocal} | |
71 | %{__autoconf} | |
72 | %{__autoheader} | |
73 | %{__automake} | |
c874c7a4 | 74 | export CXXFLAGS="%{rpmcxxflags} -std=c++11" |
7a8d4c54 JB |
75 | %configure \ |
76 | %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no} | |
77 | %{__make} | |
a6b33d7b JB |
78 | |
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %{__make} install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
7a8d4c54 JB |
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 | |
c411a5ee JB |
87 | install -D -p %{SOURCE3} $RPM_BUILD_ROOT/lib/udev/rules.d/90-vpdupdate.rules |
88 | ||
89 | install -d $RPM_BUILD_ROOT/var/lib/lsvpd | |
a6b33d7b | 90 | |
8706ca9d JB |
91 | %clean |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
a6b33d7b | 94 | %post |
3ff35f2f JB |
95 | /sbin/chkconfig --add vpdupdater |
96 | ||
97 | %postun -p /sbin/ldconfig | |
a6b33d7b JB |
98 | |
99 | %preun | |
100 | if [ "$1" = "0" ] ; then | |
3ff35f2f | 101 | /sbin/chkconfig --del vpdupdater |
a6b33d7b JB |
102 | fi |
103 | ||
3ff35f2f JB |
104 | %triggerpostun -- lsvpd < 1.0.0 |
105 | /sbin/chkconfig --del lsvpd | |
106 | ||
a6b33d7b JB |
107 | %files |
108 | %defattr(644,root,root,755) | |
c411a5ee | 109 | %doc AUTHORS COPYING ChangeLog NEWS README |
7a8d4c54 JB |
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 | |
e4a77fcf | 117 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/nvme_templates.conf |
7a8d4c54 | 118 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf |
3ff35f2f | 119 | %attr(754,root,root) /etc/rc.d/init.d/vpdupdater |
7a8d4c54 | 120 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater |
c411a5ee JB |
121 | /lib/udev/rules.d/90-vpdupdate.rules |
122 | %dir /var/lib/lsvpd | |
3ff35f2f JB |
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* |