- BR: libvpd-cxx-devel
[packages/lsvpd.git] / lsvpd.spec
CommitLineData
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 8Summary: VPD/hardware inventory utilities for Linux
40312222 9Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa
a6b33d7b 10Name: lsvpd
4cdb445c 11Version: 1.7.0
7a8d4c54
JB
12Release: 1
13License: GPL v2+
a6b33d7b 14Group: Applications/System
7a8d4c54 15Source0: http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
4cdb445c 16# Source0-md5: f412a63741dc29e6a23999793237b524
7a8d4c54
JB
17Source1: vpdupdater.init
18Source2: vpdupdater.sysconfig
3ff35f2f 19Patch0: %{name}-make.patch
b1cb8d42 20Patch1: %{name}-nortas.patch
27f7840e 21URL: http://linux-diag.sourceforge.net/Lsvpd.html
3ff35f2f
JB
22BuildRequires: autoconf
23BuildRequires: automake
7a8d4c54 24%{?with_rtas:BuildRequires: librtas-devel}
3ff35f2f 25BuildRequires: libstdc++-devel
7a8d4c54 26BuildRequires: libtool >= 2:2.0
aa56015d 27BuildRequires: libvpd-cxx-devel >= 2
11297fa9 28BuildRequires: rpmbuild(macros) >= 1.268
3ff35f2f
JB
29BuildRequires: sg3_utils-devel
30BuildRequires: zlib-devel
a6b33d7b 31Requires(post,preun): /sbin/chkconfig
3ff35f2f 32Requires(post): /sbin/ldconfig
4cdb445c
JB
33Requires: /lib/hwdata/pci.ids
34Requires: /lib/hwdata/usb.ids
35Requires: hwdata >= 0.243-5
00f47270 36Requires: rc-scripts
a6b33d7b
JB
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
41These commands, along with a boot-time scanning script called
42update-device-tree, constitute a simple hardware inventory system. The
43lsvpd command provides Vital Product Data (VPD) about hardware
44components to higher-level serviceability tools. The lscfg command
45provides a more human-readable format of the VPD, as well as some
46system-specific information. lsmcode lists microcode and firmware
47levels.
48
a018b7aa
JR
49%description -l pl.UTF-8
50Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
a6b33d7b 51wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
a018b7aa
JR
52prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
53(Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
54poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
55postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
a6b33d7b
JB
56wypisuje 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
74rm -rf $RPM_BUILD_ROOT
75
76%{__make} install \
77 DESTDIR=$RPM_BUILD_ROOT
78
7a8d4c54
JB
79install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
80install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater
a6b33d7b 81
8706ca9d
JB
82%clean
83rm -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
91if [ "$1" = "0" ] ; then
3ff35f2f 92 /sbin/chkconfig --del vpdupdater
a6b33d7b
JB
93fi
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*
This page took 0.083653 seconds and 4 git commands to generate.