]>
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 |
c3b6bd98 | 11 | Version: 1.7.6 |
7a8d4c54 | 12 | Release: 1 |
c411a5ee | 13 | License: GPL v2+ with librtas exception |
a6b33d7b | 14 | Group: Applications/System |
7a8d4c54 | 15 | Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz |
c3b6bd98 | 16 | # Source0-md5: a5bd894790dc06ff8ffbda13bf50115a |
7a8d4c54 JB |
17 | Source1: vpdupdater.init |
18 | Source2: vpdupdater.sysconfig | |
c411a5ee JB |
19 | # from libvpd sources |
20 | Source3: 90-vpdupdate.rules | |
21 | Patch0: %{name}-nortas.patch | |
27f7840e | 22 | URL: http://linux-diag.sourceforge.net/Lsvpd.html |
c411a5ee | 23 | BuildRequires: autoconf >= 2.69 |
3ff35f2f | 24 | BuildRequires: automake |
7a8d4c54 | 25 | %{?with_rtas:BuildRequires: librtas-devel} |
3ff35f2f | 26 | BuildRequires: libstdc++-devel |
7a8d4c54 | 27 | BuildRequires: libtool >= 2:2.0 |
aa56015d | 28 | BuildRequires: libvpd-cxx-devel >= 2 |
11297fa9 | 29 | BuildRequires: rpmbuild(macros) >= 1.268 |
3ff35f2f | 30 | BuildRequires: sg3_utils-devel |
c411a5ee | 31 | BuildRequires: sqlite3-devel >= 3 |
3ff35f2f | 32 | BuildRequires: zlib-devel |
a6b33d7b | 33 | Requires(post,preun): /sbin/chkconfig |
3ff35f2f | 34 | Requires(post): /sbin/ldconfig |
4cdb445c JB |
35 | Requires: /lib/hwdata/pci.ids |
36 | Requires: /lib/hwdata/usb.ids | |
37 | Requires: hwdata >= 0.243-5 | |
00f47270 | 38 | Requires: rc-scripts |
a6b33d7b JB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
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 | |
49 | levels. | |
50 | ||
a018b7aa JR |
51 | %description -l pl.UTF-8 |
52 | Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one, | |
a6b33d7b | 53 | wraz z uruchamianym przy starcie systemu skryptem update-device-tree, |
a018b7aa JR |
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 | |
a6b33d7b JB |
58 | wypisuje poziomy mikrokodu i firmware'u. |
59 | ||
60 | %prep | |
61 | %setup -q | |
30c21f0a | 62 | %patch0 -p1 |
a6b33d7b JB |
63 | |
64 | %build | |
3ff35f2f JB |
65 | %{__libtoolize} |
66 | %{__aclocal} | |
67 | %{__autoconf} | |
68 | %{__autoheader} | |
69 | %{__automake} | |
7a8d4c54 JB |
70 | %configure \ |
71 | %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no} | |
72 | %{__make} | |
a6b33d7b JB |
73 | |
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %{__make} install \ | |
78 | DESTDIR=$RPM_BUILD_ROOT | |
79 | ||
7a8d4c54 JB |
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 | |
c411a5ee JB |
82 | install -D -p %{SOURCE3} $RPM_BUILD_ROOT/lib/udev/rules.d/90-vpdupdate.rules |
83 | ||
84 | install -d $RPM_BUILD_ROOT/var/lib/lsvpd | |
85 | touch $RPM_BUILD_ROOT/var/lib/lsvpd/run.vpdupdate | |
a6b33d7b | 86 | |
8706ca9d JB |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
a6b33d7b | 90 | %post |
3ff35f2f JB |
91 | /sbin/chkconfig --add vpdupdater |
92 | ||
93 | %postun -p /sbin/ldconfig | |
a6b33d7b JB |
94 | |
95 | %preun | |
96 | if [ "$1" = "0" ] ; then | |
3ff35f2f | 97 | /sbin/chkconfig --del vpdupdater |
a6b33d7b JB |
98 | fi |
99 | ||
3ff35f2f JB |
100 | %triggerpostun -- lsvpd < 1.0.0 |
101 | /sbin/chkconfig --del lsvpd | |
102 | ||
a6b33d7b JB |
103 | %files |
104 | %defattr(644,root,root,755) | |
c411a5ee | 105 | %doc AUTHORS COPYING ChangeLog NEWS README |
7a8d4c54 JB |
106 | %attr(755,root,root) %{_sbindir}/lscfg |
107 | %attr(755,root,root) %{_sbindir}/lsmcode | |
108 | %attr(755,root,root) %{_sbindir}/lsvio | |
109 | %attr(755,root,root) %{_sbindir}/lsvpd | |
110 | %attr(755,root,root) %{_sbindir}/vpdupdate | |
111 | %dir %{_sysconfdir}/lsvpd | |
112 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf | |
113 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf | |
3ff35f2f | 114 | %attr(754,root,root) /etc/rc.d/init.d/vpdupdater |
7a8d4c54 | 115 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater |
c411a5ee JB |
116 | /lib/udev/rules.d/90-vpdupdate.rules |
117 | %dir /var/lib/lsvpd | |
118 | # empty control file, only mtime changes and matters | |
119 | %verify(not mtime) /var/lib/lsvpd/run.vpdupdate | |
3ff35f2f JB |
120 | %{_mandir}/man8/lscfg.8* |
121 | %{_mandir}/man8/lsmcode.8* | |
122 | %{_mandir}/man8/lsvio.8* | |
123 | %{_mandir}/man8/lsvpd.8* | |
124 | %{_mandir}/man8/vpdupdate.8* |