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