6d24a9b996841f1e2f464aa4a83704786204681b
[pypcilib.git] / pypcilib.spec
1 %define url $URL$
2
3 %define name pypcilib
4 %define version 0.2
5 %define taglevel 11
6
7 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8
9 %{!?python_sitelib: %define python_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
10 %{!?python_sitearch: %define python_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
11
12 Summary: Python library for doing PCI stuff
13 Name: %{name}
14 Version: %{version}
15 Release: %{release}
16 License: BSD
17 Group: System Environment/Libraries
18
19 Packager: PlanetLab Central <support@planet-lab.org>
20 Distribution: PlanetLab %{plrelease}
21 #URL: http://svn.planet-lab.org/wiki/pypcilib
22 URL: %(echo %{url} | cut -d ' ' -f 2)
23
24 Source0: pypcilib-%{version}.tar.bz2
25
26 Requires: /sbin/lspci
27
28 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
29
30 %description
31 pypcilib is a Python library to scan PCI devices using
32 libpci from pciutils, and to parse the modules.pcimap file.
33
34
35 %prep
36 %setup -q
37
38
39 %build
40 %{__python2} setup.py build
41
42
43 %install
44 rm -fr "%{buildroot}"
45 %{__python2} setup.py install -O1 --skip-build --root "%{buildroot}"
46 touch %{buildroot}%{python_sitelib}/pypcimap.py{c,o}
47 touch %{buildroot}%{python_sitelib}/pypci.py{c,o}
48
49
50 %clean
51 rm -fr "%{buildroot}"
52
53
54 %files
55 %defattr(-,root,root,-)
56 %{python_sitelib}/pypcimap.py
57 %ghost %{python_sitelib}/pypcimap.pyc
58 %ghost %{python_sitelib}/pypcimap.pyo
59 %{python_sitelib}/pypci.py
60 %ghost %{python_sitelib}/pypci.pyc
61 %ghost %{python_sitelib}/pypci.pyo
62 # xxx - quick'n dirty
63 %if ("%{distro}" == "Fedora" && %{distrorelease} >= 9) || ("%{distro}" == "SL" && %{distrorelease} >= 6) || ("%{distro}" == "CentOS")
64 %{python_sitelib}/pypciscan*.egg-info
65 %endif
66
67
68 %changelog
69 * Mon Feb 11 2013 Stephen Soltesz <soltesz@opentechinstitute.org> - pypcilib-0.2-11
70
71 * Fri Mar 11 2011 S.Çağlar Onur <caglar@verivue.com> - pypcilib-0.2-10
72 - Supoprt SL6
73
74 * Sun Dec 27 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-9
75 - fix build for fedora 12
76
77 * Mon Aug 10 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - pypcilib-0.2-8
78 - Add e1000e to the greylist
79
80 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-7
81 - ready for fedora11
82
83 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-6
84 - use 8139too driver over 8139cp for realtek 8139 chipsets
85
86 * Thu Jan 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-5
87 - support for building on fedora 10
88
89 * Thu Dec 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-4
90 - somehow the versions in the specfile are wrong in tag 0.2-3
91
92 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - pypcilib-0.2-2
93 - fixes for building on f9/gcc-4.3 - no functional change
94
95 * Fri Mar 14 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.2-1
96 - Remove pypciscan library, reimplemented in Python
97
98 * Mon Nov 19 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
99 - initial release