Setting tag plnode-utils-0.2-2
[plnode-utils.git] / plnode-utils-vs.spec
1 %define name plnode-utils
2 %define version 0.2
3 %define taglevel 2
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 # for backwards compatibilty until legacy packages import from plnode
37 cp plnode/bwlimit_vs.py bwlimit.py
38 /usr/bin/python setup.py build
39
40 %install
41 /usr/bin/python setup.py install --skip-build --root "$RPM_BUILD_ROOT"
42
43 %clean
44 rm -rf $RPM_BUILD_ROOT
45
46 # moved from util-vserver-pl package
47 %post
48 /usr/bin/bwlimit init
49
50 %files
51 %{python_sitelib}/*
52 %{_bindir}/*
53
54 %changelog
55 * Mon Feb 11 2013 Stephen Soltesz <soltesz@opentechinstitute.org> - plnode-utils-0.2-2
56 - import bwlimit from plnode dir, and keep legacy support.
57