pciutils/pciutils.spec

153 lines
4.7 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 11:11:24 -04:00
Name: pciutils
2023-11-07 15:00:24 +08:00
Version: 3.8.0
Release: 2
2019-09-30 11:11:24 -04:00
Summary: PCI bus related utilities
License: GPLv2+
URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
2020-01-06 17:12:12 +08:00
Source0: https://mirrors.edge.kernel.org/pub/software/utils/pciutils/%{name}-%{version}.tar.gz
2019-09-30 11:11:24 -04:00
2023-11-07 15:00:24 +08:00
# patch0 is from fedora, change pci.ids directory from /usr/share to /usr/share/hwdata
Patch0000: 0000-pciutils-2.2.1-idpath.patch
2023-11-07 15:00:24 +08:00
# patch1 is from fedora, rhbz#195327
Patch0001: 0001-pciutils-dir-d.patch
2023-11-07 15:00:24 +08:00
#https://github.com/openwrt/packages/pull/19215
Patch0002: 0002-avoid-addng-multiple-version-tags.patch
#https://github.com/pciutils/pciutils/pull/112
Patch0003: 0003-lspci-fix-filter-support-for-subtress-in-tree-mode.patch
2019-09-30 11:11:24 -04:00
ExclusiveOS: Linux
2023-11-07 15:00:24 +08:00
BuildRequires: gcc sed kmod-devel pkgconfig zlib-devel
%ifarch i686
BuildRequires: which kmod-libs
%endif
Requires: hwdata
2019-09-30 11:11:24 -04:00
Provides: %{name}-libs
Obsoletes: %{name}-libs
Provides: %{name}-libs-debuginfo
Obsoletes: %{name}-libs-debuginfo
%description
The PCI Utilities are a collection of programs for inspecting and manipulating configuration
of PCI devices, all based on a common portable library libpci which offers access to the PCI
configuration space on a variety of operating systems.
The utilities include:
lspci
displays detailed information about all PCI buses and devices in the system
setpci
allows reading from and writing to PCI device configuration registers. For example, you
can adjust the latency timers with it.
%package devel
Summary: Library and Include Files of the PCI utilities
Requires: zlib-devel pkgconfig %{name} = %{version}-%{release}
Provides: %{name}-devel-static
Obsoletes: %{name}-devel-static
%description devel
This package contains the files that are necessary for software
development using the PCI utilities.
%package help
Summary: Including man files for pciutils
Requires: man
%description help
This contains man files for the using of pciutils.
%prep
2023-11-07 15:00:24 +08:00
%autosetup -n %{name}-%{version} -p1
2019-09-30 11:11:24 -04:00
%build
make SHARED="no" ZLIB="no" LIBKMOD=yes STRIP="" OPT="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" PREFIX="/usr" %{?_smp_mflags}
mv lib/libpci.a lib/libpci.a.tobak
make clean
make SHARED="yes" ZLIB="no" LIBKMOD=yes STRIP="" OPT="$RPM_OPT_FLAGS" PREFIX="/usr" LIBDIR="/%{_lib}" %{?_smp_mflags}
sed -i "s|^libdir=.*$|libdir=/%{_lib}|" lib/libpci.pc
%install
make install PREFIX=$RPM_BUILD_ROOT/usr SBINDIR=$RPM_BUILD_ROOT/sbin \
ROOT=$RPM_BUILD_ROOT/ MANDIR=$RPM_BUILD_ROOT/%{_mandir} STRIP="" \
SHARED="yes" LIBDIR=$RPM_BUILD_ROOT/%{_lib}
install -d $RPM_BUILD_ROOT/{%{_libdir}/pkgconfig,%{_includedir}/pci}
mv lib/libpci.a.tobak lib/libpci.a
install -p -m 644 lib/libpci.a $RPM_BUILD_ROOT%{_libdir}
cp -p lib/{pci,header,config,types}.h $RPM_BUILD_ROOT%{_includedir}/pci
install -p lib/config.h $RPM_BUILD_ROOT%{_includedir}/pci/config.%{_lib}.h
/sbin/ldconfig -N $RPM_BUILD_ROOT%{_libdir}
install -p lib/libpci.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig
install -D -m 0644 lib/libpci.pc %{buildroot}%{_libdir}/pkgconfig/libpci.pc
install -p lib/libpci.so.* $RPM_BUILD_ROOT/%{_lib}/
ln -s ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/*.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpci.so
rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids*
2019-09-30 11:11:24 -04:00
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README ChangeLog pciutils.lsm COPYING
2023-11-07 15:00:24 +08:00
/usr/bin/lspci
2019-09-30 11:11:24 -04:00
/sbin/setpci
/sbin/update-pciids
/%{_lib}/libpci.so.*
%files devel
%defattr(0644, root, root, 0755)
%{_libdir}/pkgconfig/libpci.pc
%{_libdir}/libpci.so
%{_includedir}/pci
%{_libdir}/libpci.a
%files help
2020-05-12 23:02:39 +08:00
%{_mandir}/man5/*
2019-09-30 11:11:24 -04:00
%{_mandir}/man7/*
%{_mandir}/man8/*
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Sep 25 2024 wangmian <wangmian@h-partners.com> - 3.8.0-2
- Fix filter support (-s/-d) for subtrees in tree mode
2023-11-07 15:00:24 +08:00
* Tue Nov 7 2023 liyanan <liyanan61@h-partners.com> - 3.8.0-1
- update to v3.8.0
* Tue Feb 9 2021 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 3.6.4-4
- solve i686 dependency problem and set release num to 4 for CI
2020-05-12 23:02:39 +08:00
* Tue Apr 14 2020 linfeilong<linfeilong@huawei.com> - 3.6.4-1
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESC:update to 3.6.4
* Tue Mar 17 2020 hy-euler <eulerstoragemt@huawei.com> - 3.6.2-5
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESC:add fedora patches for displaying more information while running lspci
2020-01-06 17:12:12 +08:00
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.6.2-4
- Type:enhancemnet
- ID:NA
- SUG:NA
- DESC:update package
2019-09-30 11:11:24 -04:00
* Thu Aug 29 2019 zoujing <zoujing13@huawei.com> - 3.6.2-3
- Type:enhancemnet
- ID:NA
- SUG:restart
2020-01-06 17:12:12 +08:00
- DESC:openEuler Debranding
2019-09-30 11:11:24 -04:00
* Mon Apr 15 2019 Buildteam <buildteam@openeuler.org> - 3.6.2-2
- Package Initialization