Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 5fd234c1c0bb2adac5945e203b48cc91 > files > 8

pciutils-3.1.2-1mdv2009.1.src.rpm

# when updating, please rebuild ldetect as it is compiled against this static library

%define build_diet 1

%define major	3
%define libname %mklibname pci %{major}

Summary:	PCI bus related utilities
Name:		pciutils
Version:	3.1.2
Release:	%mkrel 1
License:	GPLv1+
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.bz2
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.2-LDFLAGS.patch
Requires:	pciids
%if %{build_diet}
BuildRequires:	dietlibc-devel
%endif
BuildConflicts:	zlib-devel
#- 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
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%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

%build
%if %{build_diet}
%make PREFIX=%{_prefix} ZLIB=no OPT="-Os -D__USE_DIETLIBC" CC="diet gcc" lib/libpci.a
cp lib/libpci.a libpci.a.diet
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},%{_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 -d %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}
install libpci.a.diet %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/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}/

%multiarch_includes %{buildroot}%{_includedir}/pci/config.h

%clean
rm -rf %{buildroot}

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%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
%{_includedir}/pci
%{_includedir}/*/pci
%multiarch %{_includedir}/multiarch-*/pci/config.h


%changelog
* Tue Feb 10 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 3.1.2-1mdv2009.1
+ Revision: 339077
- update to new version 3.1.2
- rediff patches 10 and 22
- spec file clean

* Wed Feb 04 2009 Pascal Terjan <pterjan@mandriva.org> 3.0.3-2mdv2009.1
+ Revision: 337437
- Disable support for network fetching of pci.ids in static libpci

* Thu Jan 08 2009 Thierry Vignaud <tvignaud@mandriva.com> 3.0.3-1mdv2009.1
+ Revision: 327278
- new release
- rediff patches

* Thu Dec 25 2008 Oden Eriksson <oeriksson@mandriva.org> 3.0.0-7mdv2009.1
+ Revision: 319062
- rediffed some fuzzy patches
- use %%ldflags

* Thu Aug 07 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.0.0-6mdv2009.0
+ Revision: 265335
- rebuild early 2009.0 package (before pixel changes)

* Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.org> 3.0.0-5mdv2009.0
+ Revision: 217579
- rebuilt against dietlibc-devel-0.32

* Tue Jun 10 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.0.0-4mdv2009.0
+ Revision: 217497
- make devel package require library (thus fixing linking of library users)
- remove kernel require from description

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Wed May 21 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.0.0-3mdv2009.0
+ Revision: 209756
- rebuild with gcc-4.3

* Wed May 14 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.0.0-2mdv2009.0
+ Revision: 207184
- provide .so link for linking

* Wed May 14 2008 Thierry Vignaud <tvignaud@mandriva.com> 3.0.0-1mdv2009.0
+ Revision: 206969
- enable dynamic library
- patch 21: allow build with dietlibc, not using unsupported __res_state.res_h_errno feature
- typo fix
- new release
- rediff pcimodules patch

* Wed Jan 02 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.2.9-1mdv2008.1
+ Revision: 140541
- new release
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Wed Aug 15 2007 Olivier Blin <oblin@mandriva.com> 2.2.6-3mdv2008.0
+ Revision: 63511
- build dietlibc library with -Os

* Tue Aug 14 2007 Olivier Blin <oblin@mandriva.com> 2.2.6-2mdv2008.0
+ Revision: 63367
- build dietlibc static library
- add patch to be able to build with dietlibc

  + Thierry Vignaud <tvignaud@mandriva.com>
    - add a note asking for rebuilding ldetect on update

* Wed Jun 27 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.6-1mdv2008.0
+ Revision: 45028
- new release

  + Pixel <pixel@mandriva.com>
    - replace BuildConflicts on zlib-devel with flag ZLIB=no

* Mon May 14 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-12mdv2008.0
+ Revision: 26643
- build w/ozlib support since it's useless

* Mon May 07 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.2.4-11mdv2008.0
+ Revision: 23932
- add zlib-devel to buildrequires to ensure building with zlib support
- do not strip binaries with 'install', otherwise rpm won't be able to create -debug package
- do parallell build


* Fri Mar 09 2007 Pixel <pixel@mandriva.com> 2.2.4-10mdv2007.1
+ Revision: 138807
- add a conflict to help workaround urpmi #29299
  (the other part of the fix is libldetect 0.7.0-5mdv now requiring pciids directly)
- don't requires kernel
  (it was meant to be a conflict, and conflicting on kernel < 2.1.82 is
  useless nowadays)
- requires pciids (otherwise lspci will fail)
- remove BuildRequires needed by update-pciids
  (since it is called in pciids now)
- remove pciutils-devel requiring pciutils, it's useless and help breaking the
  loop below:
- move update-pciids.sh inside pciutils-devel
  (it's a little ugly, but it allows pciids to buildrequire pciutils-devel
  without introducing a loop (when bootstrapping distro))

* Thu Mar 08 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-8mdv2007.1
+ Revision: 138536
- package update-pciids.sh (for pciids package)
- stop packaging pci.ids (now in pciids package)

* Thu Mar 08 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-7mdv2007.1
+ Revision: 138525
- reenable updating pci.ids

* Mon Feb 26 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-6mdv2007.1
+ Revision: 125875
- bump release

* Mon Feb 26 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-4mdv2007.1
+ Revision: 125855
- bump release
- fix library on x86_64

* Fri Feb 23 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-3mdv2007.1
+ Revision: 124846
- rebuild in order to update pci.ids
- buildrequire curl for update-pciids.sh

* Fri Jan 26 2007 Thierry Vignaud <tvignaud@mandriva.com> 2.2.4-2mdv2007.1
+ Revision: 113897
- update pci.ids

* Fri Nov 24 2006 Pixel <pixel@mandriva.com> 2.2.4-1mdv2007.1
+ Revision: 86875
- new release
- adapt patch10
- add /usr/include/multiarch-i386-linux/pci to file list (what's this?)
- Import pciutils

* Fri Jun 23 2006 Pixel <pixel@mandriva.com> 2.2.3-1mdv2007.0
- new release

* Mon Jan 09 2006 Pixel <pixel@mandriva.com> 2.2.1-3mdk
- use uint* & stdin.h instead of u_int* & sys/types.h
  (u_int* is not available in diet libc)

* Thu Jan 05 2006 Pixel <pixel@mandriva.com> 2.2.1-2mdk
- types.h is needed in pciutils-devel

* Sun Dec 18 2005 Pixel <pixel@mandriva.com> 2.2.1-1mdk
- new release
- update pci.ids
- redo patch11, patch10
- drop patch1, patch12 (applied upstream)
- drop patch13 (seems to be useless)

* Mon Dec 12 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-21mdk
- update pci.ids

* Thu Nov 24 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-20mdk
- update pci.ids

* Mon Nov 07 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-19mdk
- update pci.ids

* Wed Oct 19 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-18mdk
- update pci.ids

* Wed Sep 07 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-17mdk
- update pci.ids

* Fri Aug 26 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.1.11-16mdk
- update pci.ids

* Sat Jun 25 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-15mdk
- update pci.ids

* Wed May 25 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-14mdk
- update pci.ids

* Sat May 14 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-13mdk
- update pci.ids

* Tue May 10 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-12mdk
- update pci.ids

* Tue Apr 26 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-11mdk
- update pci.ids

* Tue Mar 08 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-10mdk
- update pci.ids

* Tue Feb 08 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-9mdk
- update pci.ids

* Fri Jan 21 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.11-8mdk
- multiarch capable

* Thu Dec 02 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-7mdk
- update pci.ids

* Wed Aug 04 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.1.11-6mdk
- update pci.ids

* Sat Jul 24 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.1.11-5mdk
- rebuild (to update pciids)
- cosmetics