1 Summary: VPD/hardware inventory utilities for Linux
2 Summary(pl): Narzêdzia do inwentaryzacji VPD/sprzêtu dla Linuksa
7 Group: Applications/System
8 Source0: http://dl.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
9 # Source0-md5: 189068fe7e7ce78de9322bbdebb64fd9
10 URL: http://linux-diag.sourceforge.net/Lsvpd.html
11 BuildRequires: perl-base
12 BuildRequires: sed >= 4.0
13 BuildRequires: sg3_utils-devel >= 1.01
14 BuildRequires: sysfsutils-devel
16 Requires(post,preun): /sbin/chkconfig
20 Requires: sg3_utils >= 1.01
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
25 These commands, along with a boot-time scanning script called
26 update-device-tree, constitute a simple hardware inventory system. The
27 lsvpd command provides Vital Product Data (VPD) about hardware
28 components to higher-level serviceability tools. The lscfg command
29 provides a more human-readable format of the VPD, as well as some
30 system-specific information. lsmcode lists microcode and firmware
34 Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworz± one,
35 wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
36 prosty system inwentaryzacji sprzêtu. Polecenie lsvpd dostarcza VPD
37 (Vital Product Data) o podzespo³ach sprzêtowych dla narzêdzi wy¿szego
38 poziomu. Polecenie lscfg dostarcza bardziej czyteln± dla cz³owieka
39 postaæ VPD oraz trochê informacji specyficznych dla systemu. lsmcode
40 wypisuje poziomy mikrokodu i firmware'u.
45 sed -i -e "s,#!/bin/sh,#!/bin/bash," scripts/lsvpd.in
46 sed -i -e 's,sysfs/,,' src/device_sysfs.c src/sysfs.c
51 CFLAGS="%{rpmcflags} -Wall -I../lib" \
52 LDLIBS="-lsysfs -lsgutils"
55 rm -rf $RPM_BUILD_ROOT
58 DESTDIR=$RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
61 install debian/init.d $RPM_BUILD_ROOT/etc/rc.d/init.d/lsvpd
62 # don't install this right now. It can crash systems.
63 rm -f $RPM_BUILD_ROOT/lib/lsvpd/pci_vpd_rom_grab
65 install -d $RPM_BUILD_ROOT/etc/cron.daily
66 install scripts/lsvpd.cron.daily $RPM_BUILD_ROOT/etc/cron.daily/lsvpd
68 ln -sf /usr/bin/find $RPM_BUILD_ROOT/lib/lsvpd/find
71 rm -rf $RPM_BUILD_ROOT
74 /sbin/chkconfig --add lsvpd
77 if [ "$1" = "0" ] ; then
78 /sbin/chkconfig --del lsvpd
82 %defattr(644,root,root,755)
83 %doc NEWS README TODO docs/*.html
84 %attr(755,root,root) /sbin/lsvpd
85 %attr(755,root,root) /sbin/lscfg
86 %attr(755,root,root) /sbin/lsmcode
87 %attr(755,root,root) /sbin/lsvio
88 %attr(755,root,root) /sbin/update-lsvpd-db
91 /lib/lsvpd/common-post.d
97 /lib/lsvpd/lsvpd-functions.bash
102 /lib/lsvpd/scsihost.conf
103 /lib/lsvpd/scsivpd.conf
104 %attr(755,root,root) /lib/lsvpd/device_handler
105 %attr(755,root,root) /lib/lsvpd/ibm_vpd_render
106 %attr(755,root,root) /lib/lsvpd/lsvpd_test
107 %attr(755,root,root) /lib/lsvpd/pci_ethernet_map
108 %attr(755,root,root) /lib/lsvpd/pci_lookup
109 %attr(755,root,root) /lib/lsvpd/pci_scsi_map
110 %attr(755,root,root) /lib/lsvpd/pci_vpd_cap_grab
111 %attr(755,root,root) /lib/lsvpd/tdump
112 %attr(755,root,root) /lib/lsvpd/tidy_lsvpd_dbs
113 %attr(755,root,root) /lib/lsvpd/tidy_subdirs
114 %attr(755,root,root) /lib/lsvpd/update-vpd.hotplug
115 %attr(755,root,root) /lib/lsvpd/vpd-name-crosslink.hotplug
116 %attr(754,root,root) /etc/rc.d/init.d/lsvpd
117 %attr(755,root,root) /etc/cron.daily/lsvpd