File pciutils-ids.spec of Package pciutils-ids
#
# spec file for package pciutils-ids
#
# Copyright (c) 2011 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: pciutils-ids
Version: 2011.10.2
Release: 1
AutoReqProv: on
Group: Hardware/Other
License: GPLv2+
Summary: PCI-utilities pci.ids database
Url: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
Source: http://pciids.sourceforge.net/pci.ids.bz2
Source2: merge-pciids
Source4: merge-pciids.pl
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
PreReq: /usr/bin/perl coreutils
%description
The database of PCI IDS for pciutils.
merge-pciids: This program merges several pci.ids files.
Authors:
--------
Martin Mares <mj@ucw.cz>
%prep
bzcat %{S:0} >pci.ids.dist
%build
%install
install -d -m755 $RPM_BUILD_ROOT%{_datadir}/pci.ids.d
install -m644 pci.ids.dist $RPM_BUILD_ROOT%{_datadir}/pci.ids.d/
install -d -m755 $RPM_BUILD_ROOT/usr/bin
install -m755 %{SOURCE4} $RPM_BUILD_ROOT/usr/bin/
install -m755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/
install -m644 /dev/null $RPM_BUILD_ROOT%{_datadir}/pci.ids
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%dir %{_datadir}/pci.ids.d
%{_datadir}/pci.ids.d/pci.ids.dist
/usr/bin/merge-pciids
/usr/bin/merge-pciids.pl
%ghost %{_datadir}/pci.ids
%post
if [ -x /usr/bin/merge-pciids -a -x /usr/bin/perl ]; then
/usr/bin/merge-pciids
else
# This should only happen in autobuild
echo "WARNING: merge-pciids or perl not found"
cp -p %{_datadir}/pci.ids.d/pci.ids.dist %{_datadir}/pci.ids
fi
%changelog