check if we can get rpm to create a Requires: to /usr/bin/python
[plnode-utils.git] / plnode-utils-vs.spec
1 %define name plnode-utils
2 %define version 0.2
3 %define taglevel 1
4
5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
6
7 # for f12
8 %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
9
10 Summary: Python utilities for a PlanetLab node
11 Name: %{name}
12 Version: %{version}
13 Release: %{release}
14 License: PlanetLab
15 Group: System Environment/Libraries
16 Source0: %{name}-%{version}.tar.gz
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
18
19 Vendor: PlanetLab
20 Packager: PlanetLab Central <support@planet-lab.org>
21 Distribution: PlanetLab %{plrelease}
22 URL: %{SCMURL}
23
24 Provides: bwlimit
25
26 %description
27 This python package provides utilities like bwlimit, used in various places on a PlanetLab node, nodemanager and mom among others. It aims at cleaning up the packaging scheme, as bwlimit used to ship with util-vserver-pl, but is relevant in the lxc variant as well.
28
29 %prep
30 %setup -q
31
32 %build
33 # xxx fixme
34 # this is where we chose which flavour of bwlimit gets shipped
35 cp plnode/bwlimit_vs.py plnode/bwlimit.py
36 python setup.py build
37
38 %install
39 python setup.py install --skip-build --root "$RPM_BUILD_ROOT"
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 # moved from util-vserver-pl package
45 %post
46 /usr/bin/bwlimit init
47
48 %files
49 %{python_sitelib}/*
50 %{_bindir}
51
52 %changelog