X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodemanager-lib.spec;h=dfa2f703acd06b99e459cbeb176b056ee27a15fe;hb=7f20c8e49eeeead8f0792030bb44c5e94d50be42;hp=92a8f58796426e8bb47a993892cb6acc1804c021;hpb=bbeec3d310b585ddf2e0edcd36973ebfbae31efc;p=nodemanager.git diff --git a/nodemanager-lib.spec b/nodemanager-lib.spec index 92a8f58..dfa2f70 100644 --- a/nodemanager-lib.spec +++ b/nodemanager-lib.spec @@ -5,7 +5,6 @@ %define taglevel 9 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} -%global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) Summary: PlanetLab Node Manager Library Name: %{name} @@ -46,18 +45,24 @@ local operations on slices. nodemanager-lib only provides a skeleton and needs as a companion either nodemanager-vs or nodemanager-lxc +# use initscripts or systemd unit files to start installed services +%if "%{distro}" == "Fedora" && %{distrorelease} >= 18 +%define make_options WITH_SYSTEMD=true +%else +%define make_options WITH_INIT=true +%endif + %prep %setup -q %build # make manages the C and Python stuff -%{__make} %{?_smp_mflags} lib +%{__make} %{?_smp_mflags} %{make_options} lib %install # make manages the C and Python stuff rm -rf $RPM_BUILD_ROOT -%{__make} %{?_smp_mflags} install-lib DESTDIR="$RPM_BUILD_ROOT" -PYTHON_SITEARCH=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'` +%{__make} %{?_smp_mflags} %{make_options} install-lib DESTDIR="$RPM_BUILD_ROOT" # install the sliver initscript (that triggers the slice initscript if any) mkdir -p $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/