# when updating, please rebuild ldetect as it is compiled against this static library %bcond_without bootstrap %define build_diet 1 %bcond_without uclibc %define major 3 %define libname %mklibname pci %{major} Summary: PCI bus related utilities Name: pciutils Version: 3.1.10 Release: %mkrel 2 License: GPLv2+ Group: System/Kernel and hardware URL: http://mj.ucw.cz/pciutils.html Source0: ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/%{name}-%{version}.tar.gz Patch0: pciutils-3.0.3-use-stdint.patch Patch10: pciutils-3.1.2-pcimodules.patch Patch11: pciutils-3.0.3-cardbus-only-when-root.patch # allow build with dietlibc, using sycall() and sys/io.h Patch20: pciutils-2.2.6-noglibc.patch # allow build with dietlibc, not using unsupported features: Patch21: pciutils-3.0.3-fix-compiliing-w-diet.patch Patch22: pciutils-3.1.10-LDFLAGS.patch # Fedora patches # (TV) all but 106 & 109 (which we disabled) were droped by fedora! # don't segfault on systems without PCI bus (rhbz #84146) Patch102: pciutils-2.1.10-scan.patch # use pread/pwrite, ifdef check is obsolete nowadays Patch103: pciutils-havepread.patch # change pci.ids directory to hwdata Patch106: pciutils-2.2.1-idpath.patch # multilib support Patch108: pciutils-3.0.2-multilib.patch # add support for directory with another pci.ids Patch109: pciutils-dir-d.patch # platform support 3x Patch110: pciutils-2.2.10-sparc-support.patch Patch111: pciutils-3.0.1-superh-support.patch Patch112: pciutils-3.1.8-arm.patch %if !%{with bootstrap} Requires: pciids %endif %if %{build_diet} BuildRequires: dietlibc-devel %endif %if %{with uclibc} BuildRequires: uClibc-devel %endif #- previous libldetect was requiring file /usr/share/pci.ids, hence a urpmi issue (cf #29299) Conflicts: %{mklibname ldetect 0.7} < 0.7.0-5mdv2007.1 %description This package contains various utilities for inspecting and setting devices connected to the PCI bus. %package devel Summary: Linux PCI development library Group: Development/C Requires: %{libname} = %{version}-%{release} %description devel This package contains a library for inspecting and setting devices connected to the PCI bus. %package -n %{libname} Summary: The PCI library Group: System/Libraries %description -n %{libname} This package contains a dynamic library for inspecting and setting devices connected to the PCI bus. %prep %setup -q %patch0 -p0 %patch10 -p1 %patch11 -p0 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch102 -p1 -b .scan~ %patch103 -p1 -b .pread~ #%patch106 -p1 -b .idpath~ %patch108 -p1 -b .multilib~ # fixme:? #%%patch109 -p1 -b .dird~ %patch110 -p1 -b .sparc~ %patch111 -p1 -b .superh~ %patch112 -p1 -b .arm~ %build %if %{build_diet} %make PREFIX=%{_prefix} ZLIB=no OPT="-Os -D__USE_DIETLIBC" CC="diet gcc" DNS=no lib/libpci.a cp lib/libpci.a libpci.a.diet make clean %endif %if %{with uclibc} %make PREFIX=%{_prefix} ZLIB=no OPT="%{uclibc_cflags}" CC="%{uclibc_cc}" DNS=no lib/libpci.a cp lib/libpci.a libpci.a.uclibc make clean %endif %make PREFIX=%{_prefix} OPT="%{optflags} -fPIC" ZLIB=no SHARED=no DNS=no LDFLAGS="%{ldflags}" lib/libpci.a cp lib/libpci.a lib/libpci.a.libc make clean # do not build with zlib support since it's useless (only needed if we compress # pci.ids which we cannot do since hal mmaps it for memory saving reason) %make PREFIX=%{_prefix} OPT="%{optflags} -fPIC" ZLIB=no SHARED=yes LDFLAGS="%{ldflags}" %install rm -rf %{buildroot} install -d %{buildroot}{%{_bindir},%{_mandir}/man8,%{_libdir}/pkgconfig,%{_includedir}/pci} install pcimodules lspci setpci %{buildroot}%{_bindir} install -m 644 pcimodules.man lspci.8 setpci.8 %{buildroot}%{_mandir}/man8 install -m 644 lib/libpci.a.libc %{buildroot}%{_libdir}/libpci.a install lib/libpci.so.%{major}.* %{buildroot}%{_libdir} ln -s libpci.so.3 %{buildroot}%{_libdir}/libpci.so %if %{build_diet} install -m644 libpci.a.diet -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libpci.a %endif %if %{with uclibc} install -m644 libpci.a.uclibc -D %{buildroot}%{uclibc_root}%{_libdir}/libpci.a %endif install -m 644 lib/{pci.h,header.h,config.h,types.h} %{buildroot}%{_includedir}/pci install -m 755 update-pciids.sh %{buildroot}%{_bindir}/ install -m 644 lib/libpci.pc %{buildroot}%{_libdir}/pkgconfig/ %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README ChangeLog pciutils.lsm %{_mandir}/man8/* %{_bindir}/lspci %{_bindir}/pcimodules %{_bindir}/setpci %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.%{major}* %files devel %defattr(-,root,root) %doc TODO %{_bindir}/update-pciids.sh %{_libdir}/*.a %{_libdir}/*.so %if %{build_diet} %{_prefix}/lib/dietlibc/lib-%{_arch}/libpci.a %endif %if %{with uclibc} %{uclibc_root}%{_libdir}/libpci.a %endif %dir %{_includedir}/pci %{_includedir}/pci/*.h %{_libdir}/pkgconfig/libpci.pc %changelog * Sun Jan 13 2013 umeabot <umeabot> 3.1.10-2.mga3 + Revision: 362643 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jul 13 2012 tv <tv> 3.1.10-1.mga3 + Revision: 270616 - rediff patch 22 - new release * Mon Jun 11 2012 tv <tv> 3.1.9-2.mga3 + Revision: 259851 - disable DNS for dietlibc build * Mon Jan 30 2012 tv <tv> 3.1.9-1.mga2 + Revision: 203554 - new release * Wed Nov 09 2011 tv <tv> 3.1.8-1.mga2 + Revision: 165861 - rediff patch 112 (ARM, from fedora) - drop patch 101 (also droped by fedora) - note that all of fedora patches but 106 & 109 (which we disabled) were droped by fedora... - rediff patch 22 - new release * Tue Jul 12 2011 cjw <cjw> 3.1.7-4.mga2 + Revision: 123054 - ship pkgconfig file - drop buildroot definition * Thu Jan 13 2011 dmorgan <dmorgan> 3.1.7-3.mga1 + Revision: 10135 - Remove mdv macros - Boostrap pciutils - imported package pciutils