102 lines
3.4 KiB
RPMSpec
102 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package pciutils
|
|
#
|
|
# Copyright (c) 2022-2023 ZhuningOS
|
|
#
|
|
|
|
|
|
%define lname libpci3
|
|
Name: pciutils
|
|
Version: 3.5.6
|
|
Release: 150300.13.6.1
|
|
Summary: PCI utilities for the Linux Kernel
|
|
License: GPL-2.0+
|
|
Group: Hardware/Other
|
|
Url: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
|
|
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
|
|
Source1: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.sign
|
|
Source2: baselibs.conf
|
|
Source3: pciutils.keyring
|
|
Patch0: pciutils-3.2.0_update-dist.patch
|
|
Patch1: pciutils-3.1.9_pkgconfig.patch
|
|
Patch2: pciutils-ocloexec.patch
|
|
Patch3: pciutils-endianh.patch
|
|
Patch4: pciutils-VPD-When-printing-item-IDs-escape-non-ASCII-characte.patch
|
|
Patch5: pciutils-Add-decoding-of-vendor-specific-VPD-fields.patch
|
|
Patch6: pciutils-VPD-Cleanup.patch
|
|
# https://github.com/pciutils/pciutils/commit/e12bd01eea67ca8cf539263124843ba281eb6ecc
|
|
Patch7: pciutils-add-decode-support-for-RCECs.patch
|
|
Patch8: pciutils-Add-PCIe-5.0-data-rate-32-GT-s-support.patch
|
|
Patch9: pciutils-Add-PCIe-6.0-data-rate-64-GT-s-support.patch
|
|
Patch10: lspci-Fixed-buffer-overflows-in-ls-tree.c.patch
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: pkgconfig(libkmod)
|
|
BuildRequires: pkgconfig(zlib)
|
|
Requires: pciutils-ids
|
|
|
|
%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.
|
|
|
|
%package -n %{lname}
|
|
Summary: PCI utility library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lname}
|
|
libpci offers access to the PCI configuration space.
|
|
|
|
%package devel
|
|
Summary: Library and Include Files of the PCI utilities
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{lname} = %{version}
|
|
|
|
%description devel
|
|
This package contains the files that are necessary for software
|
|
development using the PCI utilities.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
make %{?_smp_mflags} OPT="%{optflags}" PREFIX=%{_prefix} LIBDIR=/%{_lib} SBINDIR=/sbin STRIP="" SHARED="yes"
|
|
|
|
%install
|
|
make install PREFIX=%{buildroot}%{_prefix} SBINDIR=%{buildroot}/sbin \
|
|
ROOT=%{buildroot}/ MANDIR=%{buildroot}/%{_mandir} STRIP="" \
|
|
SHARED="yes" LIBDIR=%{buildroot}/%{_lib}
|
|
mkdir -p %{buildroot}%{_includedir}/pci
|
|
cp -p lib/{pci,header,config,types}.h %{buildroot}%{_includedir}/pci/
|
|
rm -rf %{buildroot}%{_datadir}/pci.ids*
|
|
install -D -m 0644 lib/libpci.pc %{buildroot}%{_libdir}/pkgconfig/libpci.pc
|
|
ln -sf /%{_lib}/libpci.so.3 %{buildroot}%{_libdir}/libpci.so
|
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc README
|
|
/sbin/lspci
|
|
/sbin/setpci
|
|
/sbin/update-pciids
|
|
%{_mandir}/man7/pcilib.7%{ext_man}
|
|
%{_mandir}/man8/lspci.8%{ext_man}
|
|
%{_mandir}/man8/setpci.8%{ext_man}
|
|
%{_mandir}/man8/update-pciids.8%{ext_man}
|
|
|
|
%files -n %{lname}
|
|
/%{_lib}/libpci.so.*
|
|
|
|
%files devel
|
|
%{_includedir}/pci/
|
|
%{_libdir}/libpci.so
|
|
%{_libdir}/pkgconfig/libpci.pc
|
|
|
|
%changelog
|