ready for tagging
[pypcilib.git] / pypcilib.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name pypcilib
7 %define version 0.1
8 %define taglevel 1
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
13 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
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 BuildRequires: pciutils-devel
28
29 Source0: pypcilib-%{version}.tar.bz2
30
31 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
32
33 %description
34 pypcilib is a Python library to scan PCI devices using
35 pciutils' libpci, and to parse the modules.pcimap file.
36
37
38 %prep
39 %setup -q
40
41
42 %build
43 CFLAGS="%{optflags}" %{__python} setup.py build
44
45
46 %install
47 rm -fr "%{buildroot}"
48 %{__python} setup.py install -O1 --skip-build --root "%{buildroot}"
49 touch %{buildroot}%{python_sitearch}/pypcimap.py{c,o}
50
51
52 %clean
53 rm -fr "%{buildroot}"
54
55
56 %files
57 %defattr(-,root,root,-)
58 %{python_sitearch}/pypciscan.so
59 %{python_sitearch}/pypcimap.py
60 %ghost %{python_sitearch}/pypcimap.pyc
61 %ghost %{python_sitearch}/pypcimap.pyo
62
63
64 %changelog
65 * Mon Nov 19 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
66 - initial release