- release 4
[packages/lsvpd.git] / lsvpd.spec
CommitLineData
a6b33d7b 1Summary: VPD/hardware inventory utilities for Linux
40312222 2Summary(pl.UTF-8): Narzędzia do inwentaryzacji VPD/sprzętu dla Linuksa
a6b33d7b 3Name: lsvpd
3ff35f2f 4Version: 1.0.3
25c075e8 5Release: 4
a6b33d7b
JB
6License: GPL
7Group: Applications/System
8Source0: http://dl.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
3ff35f2f
JB
9# Source0-md5: 5d6cc395deeab1bb926a2f973d4cad1d
10Patch0: %{name}-make.patch
27f7840e 11URL: http://linux-diag.sourceforge.net/Lsvpd.html
3ff35f2f
JB
12BuildRequires: autoconf
13BuildRequires: automake
14BuildRequires: db-cxx-devel >= 4.2
15BuildRequires: libstdc++-devel
16BuildRequires: libtool
11297fa9 17BuildRequires: rpmbuild(macros) >= 1.268
3ff35f2f
JB
18BuildRequires: sg3_utils-devel
19BuildRequires: zlib-devel
a6b33d7b 20Requires(post,preun): /sbin/chkconfig
3ff35f2f 21Requires(post): /sbin/ldconfig
00f47270 22Requires: rc-scripts
a6b33d7b
JB
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
3ff35f2f
JB
25%define _exec_prefix /
26%define _libdir /usr/%{_lib}
27%define _sbindir /sbin
28
a6b33d7b
JB
29%description
30The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
31These commands, along with a boot-time scanning script called
32update-device-tree, constitute a simple hardware inventory system. The
33lsvpd command provides Vital Product Data (VPD) about hardware
34components to higher-level serviceability tools. The lscfg command
35provides a more human-readable format of the VPD, as well as some
36system-specific information. lsmcode lists microcode and firmware
37levels.
38
a018b7aa
JR
39%description -l pl.UTF-8
40Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
a6b33d7b 41wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
a018b7aa
JR
42prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
43(Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
44poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
45postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
a6b33d7b
JB
46wypisuje poziomy mikrokodu i firmware'u.
47
3ff35f2f
JB
48%package devel
49Summary: Header files for vpd library
50Summary(pl.UTF-8): Pliki nagłówkowe biblioteki vpd
51Group: Development/Libraries
52Requires: %{name} = %{version}-%{release}
53
54%description devel
55Header files for vpd library.
56
57%description devel -l pl.UTF-8
58Pliki nagłówkowe biblioteki vpd.
59
60%package static
61Summary: Static vpd library
62Summary(pl.UTF-8): Statyczna biblioteka vpd
63Group: Development/Libraries
64Requires: %{name}-devel = %{version}-%{release}
65
66%description static
67Static vpd library.
68
69%description static -l pl.UTF-8
70Statyczna biblioteka vpd.
71
a6b33d7b
JB
72%prep
73%setup -q
30c21f0a 74%patch0 -p1
a6b33d7b
JB
75
76%build
3ff35f2f
JB
77%{__libtoolize}
78%{__aclocal}
79%{__autoconf}
80%{__autoheader}
81%{__automake}
82%configure
2af74028 83%{__make} LIBDB=-ldb_cxx-4.6
a6b33d7b
JB
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
88%{__make} install \
89 DESTDIR=$RPM_BUILD_ROOT
90
91install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
3ff35f2f 92install vpdupdater $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
a6b33d7b 93
3ff35f2f
JB
94install -d $RPM_BUILD_ROOT/%{_lib}
95mv -f $RPM_BUILD_ROOT%{_libdir}/libvpd-1.0.so.*.*.* $RPM_BUILD_ROOT/%{_lib}
96ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo libvpd-1.0.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libvpd-1.0.so
a6b33d7b 97
8706ca9d
JB
98%clean
99rm -rf $RPM_BUILD_ROOT
100
a6b33d7b 101%post
3ff35f2f
JB
102/sbin/ldconfig
103/sbin/chkconfig --add vpdupdater
104
105%postun -p /sbin/ldconfig
a6b33d7b
JB
106
107%preun
108if [ "$1" = "0" ] ; then
3ff35f2f 109 /sbin/chkconfig --del vpdupdater
a6b33d7b
JB
110fi
111
3ff35f2f
JB
112%triggerpostun -- lsvpd < 1.0.0
113/sbin/chkconfig --del lsvpd
114
a6b33d7b
JB
115%files
116%defattr(644,root,root,755)
117%doc NEWS README TODO docs/*.html
a6b33d7b
JB
118%attr(755,root,root) /sbin/lscfg
119%attr(755,root,root) /sbin/lsmcode
8706ca9d 120%attr(755,root,root) /sbin/lsvio
3ff35f2f
JB
121%attr(755,root,root) /sbin/lsvpd
122%attr(755,root,root) /sbin/vpdupdate
123%attr(755,root,root) /%{_lib}/libvpd-1.0.so.*.*.*
124%attr(754,root,root) /etc/rc.d/init.d/vpdupdater
125%{_mandir}/man8/lscfg.8*
126%{_mandir}/man8/lsmcode.8*
127%{_mandir}/man8/lsvio.8*
128%{_mandir}/man8/lsvpd.8*
129%{_mandir}/man8/vpdupdate.8*
130
131%files devel
132%defattr(644,root,root,755)
133%attr(755,root,root) %{_libdir}/libvpd-1.0.so
134%{_libdir}/libvpd-1.0.la
135%{_includedir}/libvpd-1
136
137%files static
138%defattr(644,root,root,755)
139%{_libdir}/libvpd-1.0.a
This page took 0.098716 seconds and 4 git commands to generate.