File lsvpd.spec of Package lsvpd

#
# spec file for package lsvpd (Version 1.6.5)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           lsvpd
BuildRequires:  db43-devel gcc-c++ libdb-4_5 libvpd2-devel pciutils sg3_utils-devel usbutils zlib-devel
Url:            http://sourceforge.net/projects/linux-diag/
Summary:        VPD Hardware Inventory Utilities for Linux
Version:        1.6.5
Release:        29
License:        GPL v2 or later
Group:          System/Monitoring
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq %fillup_prereq
Requires:       /bin/sed
Source0:        %{name}-%{version}.tar.bz2
Patch3:         lsvpd.cxx-includes.patch	

%description
The lsvpd package contains both the lsvpd, lscfg and lsmcode commands.
These commands, along with a boot-time scanning script called
update-device-tree, constitute a simple hardware inventory system. The
lsvpd command provides Vital Product Data (VPD) about hardware
components to higher-level serviceability tools. The lscfg command
provides a more human-readable format of the VPD, as well as some
system-specific information.  lsmcode lists microcode and firmware
levels.



Authors:
--------
    Martin Schwenke @ IBM

%prep
%setup -q
%patch3 -p1

%build
autoreconf -fi
%configure
make %{?jobs:-j%jobs}
chmod 644 README* COPYING NEWS 

%clean 
rm -rf $RPM_BUILD_ROOT

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir $RPM_BUILD_ROOT/sbin
for i in lscfg lsmcode lsvio lsvpd update-lsvpd-db
do
 if test -f $RPM_BUILD_ROOT/usr/sbin/$i
 then
   ln -sfvbn ../usr/sbin/$i $RPM_BUILD_ROOT/sbin/$i
 fi
done
if [ -e /etc/udev/rules.d/99-lsvpd.rules ] ; then
	%{__rm} /etc/udev/rules.d/99-lsvpd.rules
fi
if [ -e /etc/udev/rules.d/99-lsvpd.disabled ] ; then
	%{__rm} /etc/udev/rules.d/99-lsvpd.disabled
fi

%post
if [ -d /var/lib/lsvpd ] ; then
  rm -rf /var/lib/lsvpd
fi
/usr/sbin/vpdupdate
exit 0

%files 
%defattr(-,root,root)
%doc README COPYING NEWS 
%dir /etc/lsvpd
%attr (644,root,root) %config /etc/lsvpd/*
/sbin/*
%attr (755,root,root) /usr/sbin/*
%{_mandir}/*/*

%changelog
* Wed Nov 26 2008 sassmann@suse.de
- package libvpd_cxx2 has been renamed to libvpd2
  (adjusting BuildRequires)
* Wed Jun 25 2008 olh@suse.de
- update lsvpd (version 1.6.5)
  builds against libvpd_cxx2
* Tue May 27 2008 ro@suse.de
- buildreq sg3_utils-devel instead of scsi
* Mon Nov 19 2007 sassmann@suse.de
- update lsvpd (version 1.4.0 - fate #302692)
- Removing udev rules from install as they are causing problems.  Hotplug will be diabled until we find a smater way of handling it.
- Updating License
- Adjusting the way vpdupdater is inserted into run control
- Removing #! from the beginning of the file.
- Fixes requested by Fedora Community
* Tue Nov 13 2007 sassmann@suse.de
- update lsvpd (version 1.3.5 - fate #302692)
- added lsvpd.db43-Makefile-fix.patch
  fixes Makefile errors concerning Berkeley DB
- merged lsvpd.db_cxx.patch
  in lsvpd.db43-Makefile-fix.patch
- rebased lsvpd.runlevel-script.patch to version 1.3.5
- rebased lsvpd.cxx-includes.patch to version 1.3.5
- updated %%post to remove and rebuild db on install
* Fri Nov 02 2007 olh@suse.de
- run vpdupdate during update to reinitialize db (308679)
* Tue Oct 09 2007 olh@suse.de
- fix c++ includes
* Wed Sep 26 2007 olh@suse.de
- update to 1.3.3
  Fixed locking issue with Berkeley DB. This should take care of
  random crashes during the first run at boot. (308679)
* Sat Aug 04 2007 olh@suse.de
- update to 1.3.1
  db4.3 changes partly merged
* Mon Jul 02 2007 olh@suse.de
- update to 1.3.0
  add udev support
* Mon May 21 2007 dmueller@suse.de
- build against db 4.3
* Thu Mar 29 2007 olh@suse.de
- add zlib-devel to buildrequires
* Wed Feb 14 2007 olh@suse.de
- fix libsgutils linking for lib64, use shared libsgutils
* Tue Feb 13 2007 olh@suse.de
- update to 1.0.3
  complete rewrite in C++
  binaries moved to /usr/sbin
* Mon Dec 11 2006 olh@suse.de
- fix incorrect string comparsion in device_scsi.c (#227459)
* Sun Nov 19 2006 olh@suse.de
- install scripts correctly, fix incorrect quoting in Makefile (#222542)
* Sun Oct 08 2006 olh@suse.de
- linux/ethtool.h needs linux/types.h
* Fri Sep 15 2006 olh@suse.de
- update to lsvpd-0.16.0
  improved sysfs support
* Fri Jul 28 2006 olh@suse.de
- boot.localfs is optional (#181972)
* Thu Jul 20 2006 olh@suse.de
- update to lsvpd-0.15.1
  On IBM POWER machines running Linux 2.6, USB device
  location codes have a better chance of being correct.
  lsvpd no longer puts "/dev/" at the beginning of device
  names in the AX field.
  lscfg now knows about the PR and FG fields.
  For SCSI device VPD, if SCSI inquiry-based VPD retrieval
  fails then VPD is manufactured using sysfs (if available).
  This works around a problem with some tape drives (or
  their drivers) that don't allow inquiries when they are in
  use.
  SCSI adapter channels with number 0xff are once again
  listed.
  IBM virtual SCSI adapters now have a more sensible
  description - the word "SCSI" should now only appear once.
  Added support for token ring adapters and communications
  controllers.  The latter is implemented using new generic
  PCI adapter support, which allows addition of new PCI
  adapter types via a single line of code.  The list of
  (partial) PCI classes that use this feature could later be
  moved to a "configuration" file.
  Sort order of VPD for SCSI-like devices has changed
  subtly.  YL is now at the end of the VPD, as for adapters
  and other devices.
* Sun Apr 23 2006 olh@suse.de
- add /etc/cron.daily/lsvpd to remove old device-tree copies
  they fill up the harddisk if the device-tree content changes,
  compared to the previous boot
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Dec 08 2005 olh@suse.de
- update to lsvpd-0.14.1
* Mon Nov 07 2005 olh@suse.de
- use LSB exit codes in runlevel script (112623)
* Wed Oct 26 2005 olh@suse.de
- update to lsvpd-0.13.2
* Fri Aug 26 2005 olh@suse.de
- build with -fno-unit-at-a-time to keep linker sections
* Fri Aug 05 2005 olh@suse.de
- update to lsvpd-0.13.0
* Fri Jul 01 2005 olh@suse.de
- update to lsvpd-0.12.7
  use RPM_OPT_FLAGS
* Mon Aug 16 2004 garloff@suse.de
- update to lsvpd-0.12.0
* Sun May 09 2004 olh@suse.de
- insserv per default only on ppc (#39117)
* Mon Mar 01 2004 olh@suse.de
- update to lsvpd-0.11.5
* Mon Feb 23 2004 olh@suse.de
- update to lsvpd-0.11.4
* Sun Aug 10 2003 olh@suse.de
- update to this weeks gnome includes
* Wed May 21 2003 olh@suse.de
- update to version lsvpd-0.8.4
  bugfis release, support for ibmsis, sym53c8xx fixes
* Wed Apr 09 2003 jplack@suse.de
- update to version lsvpd-0.8.1
* Wed Mar 19 2003 olh@suse.de
- update to version lsvpd-0.6.5
* Wed Mar 19 2003 olh@suse.de
- add a workaround for missing ibm,read-pci-config nodes
* Thu Mar 13 2003 olh@suse.de
- update to version lsvpd-0.6.2
* Wed Mar 12 2003 olh@suse.de
- update to version lsvpd-0.6.1
* Tue Mar 11 2003 olh@suse.de
- initial version lsvpd-0.5.5, tweak init scripts
openSUSE Build Service is sponsored by