]>
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 |
4cdb445c | 11 | Version: 1.7.0 |
7a8d4c54 JB |
12 | Release: 1 |
13 | License: GPL v2+ | |
a6b33d7b | 14 | Group: Applications/System |
7a8d4c54 | 15 | Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz |
4cdb445c | 16 | # Source0-md5: f412a63741dc29e6a23999793237b524 |
7a8d4c54 JB |
17 | Source1: vpdupdater.init |
18 | Source2: vpdupdater.sysconfig | |
3ff35f2f | 19 | Patch0: %{name}-make.patch |
b1cb8d42 | 20 | Patch1: %{name}-nortas.patch |
27f7840e | 21 | URL: http://linux-diag.sourceforge.net/Lsvpd.html |
3ff35f2f JB |
22 | BuildRequires: autoconf |
23 | BuildRequires: automake | |
7a8d4c54 | 24 | %{?with_rtas:BuildRequires: librtas-devel} |
3ff35f2f | 25 | BuildRequires: libstdc++-devel |
7a8d4c54 | 26 | BuildRequires: libtool >= 2:2.0 |
aa56015d | 27 | BuildRequires: libvpd-cxx-devel >= 2 |
11297fa9 | 28 | BuildRequires: rpmbuild(macros) >= 1.268 |
3ff35f2f JB |
29 | BuildRequires: sg3_utils-devel |
30 | BuildRequires: zlib-devel | |
a6b33d7b | 31 | Requires(post,preun): /sbin/chkconfig |
3ff35f2f | 32 | Requires(post): /sbin/ldconfig |
4cdb445c JB |
33 | Requires: /lib/hwdata/pci.ids |
34 | Requires: /lib/hwdata/usb.ids | |
35 | Requires: hwdata >= 0.243-5 | |
00f47270 | 36 | Requires: rc-scripts |
a6b33d7b JB |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | The lsvpd package contains both the lsvpd, lscfg and lsmcode commands. | |
41 | These commands, along with a boot-time scanning script called | |
42 | update-device-tree, constitute a simple hardware inventory system. The | |
43 | lsvpd command provides Vital Product Data (VPD) about hardware | |
44 | components to higher-level serviceability tools. The lscfg command | |
45 | provides a more human-readable format of the VPD, as well as some | |
46 | system-specific information. lsmcode lists microcode and firmware | |
47 | levels. | |
48 | ||
a018b7aa JR |
49 | %description -l pl.UTF-8 |
50 | Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one, | |
a6b33d7b | 51 | wraz z uruchamianym przy starcie systemu skryptem update-device-tree, |
a018b7aa JR |
52 | prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD |
53 | (Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego | |
54 | poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka | |
55 | postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode | |
a6b33d7b JB |
56 | wypisuje poziomy mikrokodu i firmware'u. |
57 | ||
58 | %prep | |
59 | %setup -q | |
30c21f0a | 60 | %patch0 -p1 |
b1cb8d42 | 61 | %patch1 -p1 |
a6b33d7b JB |
62 | |
63 | %build | |
3ff35f2f JB |
64 | %{__libtoolize} |
65 | %{__aclocal} | |
66 | %{__autoconf} | |
67 | %{__autoheader} | |
68 | %{__automake} | |
7a8d4c54 JB |
69 | %configure \ |
70 | %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no} | |
71 | %{__make} | |
a6b33d7b JB |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %{__make} install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT | |
78 | ||
7a8d4c54 JB |
79 | install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater |
80 | install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater | |
a6b33d7b | 81 | |
8706ca9d JB |
82 | %clean |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
a6b33d7b | 85 | %post |
3ff35f2f JB |
86 | /sbin/chkconfig --add vpdupdater |
87 | ||
88 | %postun -p /sbin/ldconfig | |
a6b33d7b JB |
89 | |
90 | %preun | |
91 | if [ "$1" = "0" ] ; then | |
3ff35f2f | 92 | /sbin/chkconfig --del vpdupdater |
a6b33d7b JB |
93 | fi |
94 | ||
3ff35f2f JB |
95 | %triggerpostun -- lsvpd < 1.0.0 |
96 | /sbin/chkconfig --del lsvpd | |
97 | ||
a6b33d7b JB |
98 | %files |
99 | %defattr(644,root,root,755) | |
7a8d4c54 | 100 | %doc AUTHORS NEWS README TODO docs/*.html |
4cdb445c | 101 | %attr(755,root,root) %{_sbindir}/invscout |
7a8d4c54 JB |
102 | %attr(755,root,root) %{_sbindir}/lscfg |
103 | %attr(755,root,root) %{_sbindir}/lsmcode | |
104 | %attr(755,root,root) %{_sbindir}/lsvio | |
105 | %attr(755,root,root) %{_sbindir}/lsvpd | |
106 | %attr(755,root,root) %{_sbindir}/vpdupdate | |
107 | %dir %{_sysconfdir}/lsvpd | |
108 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf | |
109 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf | |
3ff35f2f | 110 | %attr(754,root,root) /etc/rc.d/init.d/vpdupdater |
7a8d4c54 | 111 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater |
3ff35f2f JB |
112 | %{_mandir}/man8/lscfg.8* |
113 | %{_mandir}/man8/lsmcode.8* | |
114 | %{_mandir}/man8/lsvio.8* | |
115 | %{_mandir}/man8/lsvpd.8* | |
116 | %{_mandir}/man8/vpdupdate.8* |