pciutils/pciutils.spec

124 lines
3.3 KiB
RPMSpec

#
# spec file for package pciutils
#
# Copyright (c) 2012 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
Version: 3.1.9
Release: 1
BuildRequires: zlib-devel
BuildRequires: pkg-config
Requires: pciutils-ids
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: pciutils-64bit
%endif
#
Group: Hardware/Other
License: GPL-2.0+
Summary: PCI-utilities for Kernel version 2.2 and newer
Url: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
Source: %{name}-%{version}.tar.bz2
Source1: COPYING
Source2: baselibs.conf
Patch: update-pciutils-dist
Patch1: %{name}-%{version}_pkgconfig.patch
Patch2: pciutils-ocloexec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
lspci: This program displays detailed information about all PCI busses
and devices in the system, replacing the original /proc/pci interface.
setpci: This program allows reading from and writing to PCI device
configuration registers. For example, you can adjust the latency timers
with it.
update-pciids: This program downloads the current version of the
pci.ids file.
Authors:
--------
Martin Mares <mj@ucw.cz>
%package devel
License: GPL-2.0+
Group: Development/Libraries/C and C++
Summary: Static Library and Include Files of the PCI-utilities
# bug437293
%ifarch ppc64
Obsoletes: pciutils-devel-64bit
%endif
#
# As we only package a static library we need zlib-devel for final linking
Requires: zlib-devel %{name} = %{version}
%description devel
This package contains the files that are necessary for software
development using the PCI-utilities.
Authors:
--------
Martin Mares <mj@ucw.cz>
%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
%build
make %{?_smp_mflags} OPT="$RPM_OPT_FLAGS -Wall" PREFIX=%{_prefix} LIBDIR=/%{_lib} SBINDIR=/sbin STRIP="" SHARED="yes"
%install
make install PREFIX=$RPM_BUILD_ROOT%{_prefix} SBINDIR=$RPM_BUILD_ROOT/sbin \
ROOT=$RPM_BUILD_ROOT/ MANDIR=$RPM_BUILD_ROOT/%{_mandir} STRIP="" \
SHARED="yes" LIBDIR=$RPM_BUILD_ROOT/%{_lib}
mkdir -p $RPM_BUILD_ROOT%{_includedir}/pci
cp -p lib/{pci,header,config,types}.h $RPM_BUILD_ROOT%{_includedir}/pci/
rm -rf $RPM_BUILD_ROOT%{_datadir}/pci.ids*
install -D -m 0644 lib/libpci.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libpci.pc
ln -sf /%{_lib}/libpci.so.3 %{buildroot}%{_libdir}/libpci.so
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc README COPYING
%doc %{_mandir}/man?/*
/%{_lib}/libpci.so.*
/sbin/*
%files devel
%defattr(-, root, root)
%{_includedir}/pci/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libpci.pc
%changelog