%define libmajver %(echo %version | cut -d. -f1) Name: pciutils Version: 3.1.8 Release: 1mamba Summary: A library for portable access to PCI bus configuration space Group: System/Kernel and Hardware Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml Source: ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/%{name}-%{version}.tar.gz Source1: http://pciids.sourceforge.net/pci.ids.bz2 Patch1: %{name}-3.1.0-pcimodules.patch Patch2: %{name}-3.1.2-pcimodules.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: bash BuildRequires: glibc-devel ## AUTOBUILDREQ-END Requires: libpci = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description The PCI Utilities package contains a library for portable access to PCI bus configuration space and several utilities based on this library. Current version works only on Linux and FreeBSD, but it can be easily extended to work on other systems as well. The utilities include: (See manual pages for more details) : lspci - displays detailed information about all PCI busses and devices in the system, replacing the original /proc/pci interface. setpci - allows to read from and write to PCI device configuration registers. For example, you can adjust the latency timers with it. The library (and therefore all the utilities) - can access PCI registers either via the /proc/bus/pci interface present since Linux 2.1.82 or via direct hardware access (to be used with older kernels and also for hardware diagnostics). It's also capable of reading and interpreting register dumps printed by `lspci -x'. %package -n libpci Summary: Linux PCI access library Group: System/Libraries %description -n libpci A library for inspecting and setting devices connected to the PCI bus. %package -n libpci-devel Summary: Linux PCI development library Group: Development/Libraries Requires: libpci = %{version}-%{release} Obsoletes: %{name}-devel %description -n libpci-devel A library for inspecting and setting devices connected to the PCI bus. This package contains the static library and include files for development. %prep %setup -q %patch1 -p1 %patch2 -p1 bzcat %{SOURCE1} >pci.ids %build # disable zlib as long as HAL wants pci.id uncompressed %make \ %if "%{_host}" != "%{_build}" CROSS_COMPILE=%{_host}- \ HOST=%{_host} \ %else CC=%{_host}-gcc \ %endif PREFIX=%{_prefix} \ LIBDIR=%{_libdir} \ SBINDIR=%{_sbindir} \ SHAREDIR=%{_datadir} \ MANDIR=%{_mandir} \ ZLIB=no \ SHARED=no \ all pcimodules mv lib/libpci.a lib/libpci.a.toinstall make clean %make \ %if "%{_host}" != "%{_build}" CROSS_COMPILE=%{_host}- \ HOST=%{_host} \ LDFLAGS="-lresolv" \ %else CC=%{_host}-gcc \ %endif PREFIX=%{_prefix} \ LIBDIR=%{_libdir} \ SBINDIR=%{_sbindir} \ SHAREDIR=%{_datadir} \ MANDIR=%{_mandir} \ SHARED=yes \ ZLIB=no \ all pcimodules %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install-lib SHARED=no PREFIX=%{_prefix} install -m0755 pcimodules %{buildroot}%{_sbindir} install -m0644 pcimodules.man %{buildroot}%{_mandir}/man8/pcimodules.8 install lib/libpci.a.toinstall %{buildroot}%{_libdir}/libpci.a ln -s libpci.so.%{version} %{buildroot}%{_libdir}/libpci.so ln -s libpci.so.%{version} %{buildroot}%{_libdir}/libpci.so.%{libmajver} install -d %{buildroot}%{_bindir} ln -s ../sbin/lspci %{buildroot}%{_bindir}/lspci %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_bindir}/lspci %{_sbindir}/lspci %{_sbindir}/pcimodules %{_sbindir}/setpci %{_sbindir}/update-pciids %{_mandir}/man7/pcilib.* %{_mandir}/man8/* %config %{_datadir}/pci.ids %doc README ChangeLog pciutils.lsm %files -n libpci %defattr(-,root,root) %{_libdir}/libpci.so.* %files -n libpci-devel %defattr(-,root,root) %{_libdir}/libpci.a %{_libdir}/libpci.so %dir %{_includedir}/pci %{_includedir}/pci/*.h %{_libdir}/pkgconfig/libpci.pc %changelog * Fri Oct 07 2011 Silvan Calarco 3.1.8-1mamba - update to 3.1.8 - added /usr/bin/lspci symlink - updates pci.ids db * Fri Aug 13 2010 Silvan Calarco 3.1.7-1mamba - update to 3.1.7 * Tue Jan 12 2010 Silvan Calarco 3.1.4-1mamba - update to 3.1.4 * Tue Jul 07 2009 Davide Madrisan 3.1.3-2mamba - removed 'obsoletes libpci' in pciutils - force pciutils to require libpci with same version and release * Mon Jul 06 2009 Silvan Calarco 3.1.3-1mamba - update to 3.1.3 * Mon May 18 2009 Automatic Build System 3.1.2-1mamba - automatic update by autodist * Tue Dec 30 2008 Silvan Calarco 3.0.3-1mamba - automatic update by autodist * Tue Jan 08 2008 Silvan Calarco 2.2.9-3mamba - shared library removed (unsupported upstream) see: http://lists.alioth.debian.org/pipermail/pkg-pciutils-discuss/2006-November/000134.html http://lists.alioth.debian.org/pipermail/pkg-pciutils-discuss/2006-March/000004.html * Tue Jan 08 2008 Silvan Calarco 2.2.9-2mamba - fix install so to install pkconfig file - added pcimodules patch * Wed Dec 19 2007 Silvan Calarco 2.2.9-1mamba - update to 2.2.9 - removed pcimodules patch and executable * Tue Oct 24 2006 Silvan Calarco 2.2.4-1qilnx - update to version 2.2.4 by autospec - fix shared library build: add soname option * Sun Jul 09 2006 Silvan Calarco 2.2.3-1qilnx - update to version 2.2.3 by autospec - pciids update to date * Tue May 02 2006 Silvan Calarco 2.2.0-4qilnx - fixed pcimodules patch - pciids update - build libpci as a shared library * Fri Oct 07 2005 Stefano Cotta Ramusino 2.2.0-3qilnx - pcimodules patched * Thu Oct 06 2005 Stefano Cotta Ramusino 2.2.0-2qilnx - file pci.ids updated added to sources - devel package added * Tue Sep 27 2005 Stefano Cotta Ramusino 2.2.0-1qilnx - update to version 2.2.0 by autospec * Mon Jul 02 2003 Silvan Calarco 2.1.11-2qilnx - added PCI-modules patch for hotplug * Mon Jun 23 2003 Silvan Calarco 2.1.11-1qilnx - first build of PCI-utils