]> git.pld-linux.org Git - packages/lsvpd.git/blob - lsvpd.spec
f627027301cfd39594345db1b5929d53187b8ffc
[packages/lsvpd.git] / lsvpd.spec
1 #
2 # Conditional build:
3 %bcond_with     rtas    # RTAS support (PowerPC)
4 #
5 %ifarch ppc ppc64
6 %define with_rtas       1
7 %endif
8 Summary:        VPD/hardware inventory utilities for Linux
9 Summary(pl.UTF-8):      Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa
10 Name:           lsvpd
11 Version:        1.7.0
12 Release:        1
13 License:        GPL v2+
14 Group:          Applications/System
15 Source0:        http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
16 # Source0-md5:  f412a63741dc29e6a23999793237b524
17 Source1:        vpdupdater.init
18 Source2:        vpdupdater.sysconfig
19 Patch0:         %{name}-make.patch
20 Patch1:         %{name}-nortas.patch
21 URL:            http://linux-diag.sourceforge.net/Lsvpd.html
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 %{?with_rtas:BuildRequires:     librtas-devel}
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libtool >= 2:2.0
27 BuildRequires:  libvpd-devel >= 2
28 BuildRequires:  rpmbuild(macros) >= 1.268
29 BuildRequires:  sg3_utils-devel
30 BuildRequires:  zlib-devel
31 Requires(post,preun):   /sbin/chkconfig
32 Requires(post): /sbin/ldconfig
33 Requires:       /lib/hwdata/pci.ids
34 Requires:       /lib/hwdata/usb.ids
35 Requires:       hwdata >= 0.243-5
36 Requires:       rc-scripts
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
49 %description -l pl.UTF-8
50 Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
51 wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
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
56 wypisuje poziomy mikrokodu i firmware'u.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61 %patch1 -p1
62
63 %build
64 %{__libtoolize}
65 %{__aclocal}
66 %{__autoconf}
67 %{__autoheader}
68 %{__automake}
69 %configure \
70         %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no}
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %{__make} install \
77         DESTDIR=$RPM_BUILD_ROOT
78
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
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 /sbin/chkconfig --add vpdupdater
87
88 %postun -p /sbin/ldconfig
89
90 %preun
91 if [ "$1" = "0" ] ; then
92         /sbin/chkconfig --del vpdupdater
93 fi
94
95 %triggerpostun -- lsvpd < 1.0.0
96 /sbin/chkconfig --del lsvpd
97
98 %files
99 %defattr(644,root,root,755)
100 %doc AUTHORS NEWS README TODO docs/*.html
101 %attr(755,root,root) %{_sbindir}/invscout
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
110 %attr(754,root,root) /etc/rc.d/init.d/vpdupdater
111 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater
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*
This page took 0.037361 seconds and 2 git commands to generate.