]> git.pld-linux.org Git - packages/lsvpd.git/blame - lsvpd.spec
- added patch to allow partial functionality on unknown (non-POWER) platform
[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
ba5a68bf
JB
11Version: 1.7.15
12Release: 1
c411a5ee 13License: GPL v2+ with librtas exception
a6b33d7b 14Group: Applications/System
ba5a68bf
JB
15#Source0Download: https://github.com/power-ras/lsvpd/tags
16Source0: https://github.com/power-ras/lsvpd/archive/v%{version}/%{name}-%{version}.tar.gz
17# Source0-md5: 7da3af9d12a6ef5676c1f7c1f32e8238
7a8d4c54
JB
18Source1: vpdupdater.init
19Source2: vpdupdater.sysconfig
c411a5ee
JB
20# from libvpd sources
21Source3: 90-vpdupdate.rules
22Patch0: %{name}-nortas.patch
40f0e40f 23Patch1: %{name}-unknown-platform.patch
ba5a68bf 24URL: https://github.com/power-ras/lsvpd
c411a5ee 25BuildRequires: autoconf >= 2.69
3ff35f2f 26BuildRequires: automake
7a8d4c54 27%{?with_rtas:BuildRequires: librtas-devel}
3ff35f2f 28BuildRequires: libstdc++-devel
7a8d4c54 29BuildRequires: libtool >= 2:2.0
ba5a68bf 30BuildRequires: libvpd-cxx-devel >= 2.2.9
11297fa9 31BuildRequires: rpmbuild(macros) >= 1.268
3ff35f2f 32BuildRequires: sg3_utils-devel
c411a5ee 33BuildRequires: sqlite3-devel >= 3
3ff35f2f 34BuildRequires: zlib-devel
a6b33d7b 35Requires(post,preun): /sbin/chkconfig
3ff35f2f 36Requires(post): /sbin/ldconfig
4cdb445c
JB
37Requires: /lib/hwdata/pci.ids
38Requires: /lib/hwdata/usb.ids
39Requires: hwdata >= 0.243-5
ba5a68bf 40Requires: libvpd-cxx >= 2.2.9
00f47270 41Requires: rc-scripts
a6b33d7b
JB
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
46These commands, along with a boot-time scanning script called
47update-device-tree, constitute a simple hardware inventory system. The
48lsvpd command provides Vital Product Data (VPD) about hardware
49components to higher-level serviceability tools. The lscfg command
50provides a more human-readable format of the VPD, as well as some
51system-specific information. lsmcode lists microcode and firmware
52levels.
53
a018b7aa
JR
54%description -l pl.UTF-8
55Pakiet lsvpd zawiera polecenia lsvpd, lscfg i lsmcode. Tworzą one,
a6b33d7b 56wraz z uruchamianym przy starcie systemu skryptem update-device-tree,
a018b7aa
JR
57prosty system inwentaryzacji sprzętu. Polecenie lsvpd dostarcza VPD
58(Vital Product Data) o podzespołach sprzętowych dla narzędzi wyższego
59poziomu. Polecenie lscfg dostarcza bardziej czytelną dla człowieka
60postać VPD oraz trochę informacji specyficznych dla systemu. lsmcode
a6b33d7b
JB
61wypisuje poziomy mikrokodu i firmware'u.
62
63%prep
64%setup -q
30c21f0a 65%patch0 -p1
40f0e40f 66%patch1 -p1
a6b33d7b
JB
67
68%build
3ff35f2f
JB
69%{__libtoolize}
70%{__aclocal}
71%{__autoconf}
72%{__autoheader}
73%{__automake}
c874c7a4 74export CXXFLAGS="%{rpmcxxflags} -std=c++11"
7a8d4c54
JB
75%configure \
76 %{!?with_rtas:ac_cv_lib_rtas_rtas_get_vpd=no}
77%{__make}
a6b33d7b
JB
78
79%install
80rm -rf $RPM_BUILD_ROOT
81
82%{__make} install \
83 DESTDIR=$RPM_BUILD_ROOT
84
7a8d4c54
JB
85install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vpdupdater
86install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/vpdupdater
c411a5ee
JB
87install -D -p %{SOURCE3} $RPM_BUILD_ROOT/lib/udev/rules.d/90-vpdupdate.rules
88
89install -d $RPM_BUILD_ROOT/var/lib/lsvpd
a6b33d7b 90
8706ca9d
JB
91%clean
92rm -rf $RPM_BUILD_ROOT
93
a6b33d7b 94%post
3ff35f2f
JB
95/sbin/chkconfig --add vpdupdater
96
97%postun -p /sbin/ldconfig
a6b33d7b
JB
98
99%preun
100if [ "$1" = "0" ] ; then
3ff35f2f 101 /sbin/chkconfig --del vpdupdater
a6b33d7b
JB
102fi
103
3ff35f2f
JB
104%triggerpostun -- lsvpd < 1.0.0
105/sbin/chkconfig --del lsvpd
106
a6b33d7b
JB
107%files
108%defattr(644,root,root,755)
c411a5ee 109%doc AUTHORS COPYING ChangeLog NEWS README
7a8d4c54
JB
110%attr(755,root,root) %{_sbindir}/lscfg
111%attr(755,root,root) %{_sbindir}/lsmcode
112%attr(755,root,root) %{_sbindir}/lsvio
113%attr(755,root,root) %{_sbindir}/lsvpd
114%attr(755,root,root) %{_sbindir}/vpdupdate
115%dir %{_sysconfdir}/lsvpd
116%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/cpu_mod_conv.conf
e4a77fcf 117%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/nvme_templates.conf
7a8d4c54 118%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lsvpd/scsi_templates.conf
3ff35f2f 119%attr(754,root,root) /etc/rc.d/init.d/vpdupdater
7a8d4c54 120%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vpdupdater
c411a5ee
JB
121/lib/udev/rules.d/90-vpdupdate.rules
122%dir /var/lib/lsvpd
3ff35f2f
JB
123%{_mandir}/man8/lscfg.8*
124%{_mandir}/man8/lsmcode.8*
125%{_mandir}/man8/lsvio.8*
126%{_mandir}/man8/lsvpd.8*
127%{_mandir}/man8/vpdupdate.8*
This page took 0.072473 seconds and 5 git commands to generate.