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