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