555496fa3a0f032fa1ba2000801ad02525f2521a
[pypcilib.git] / pypcilib.spec
1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
3
4 Summary: Python library for doing PCI stuff
5 Name: pypcilib
6 Version: 0.1
7 Release: 1
8 License: BSD
9 URL: http://svn.planet-lab.org/wiki/pypcilib
10 Group: System Environment/Libraries
11
12 BuildRequires: pciutils-devel
13
14 Source0: pypcilib-%{version}.tar.bz2
15
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
17
18
19 %description
20 pypcilib is a Python library to scan PCI devices using
21 pciutils' libpci, and to parse the modules.pcimap file.
22
23
24 %prep
25 %setup -q
26
27
28 %build
29 CFLAGS="%{optflags}" %{__python} setup.py build
30
31
32 %install
33 rm -fr "%{buildroot}"
34 %{__python} setup.py install -O1 --skip-build --root "%{buildroot}"
35 touch %{buildroot}%{python_sitearch}/pypcimap.py{c,o}
36
37
38 %clean
39 rm -fr "%{buildroot}"
40
41
42 %files
43 %defattr(-,root,root,-)
44 %{python_sitearch}/pypciscan.so
45 %{python_sitearch}/pypcimap.py
46 %ghost %{python_sitearch}/pypcimap.pyc
47 %ghost %{python_sitearch}/pypcimap.pyo
48
49
50 %changelog
51 * Mon Nov 19 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
52 - initial release