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