%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
%global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: %{name}
Version: %{version}
Requires: pyOpenSSL >= 0.7
Requires: m2crypto
+Summary: the GENI layer around MyPLC
+Group: Applications/System
-Summary: Geniwrapper
+%package sfi
+Summary: the GENI layer around MyPLC - client side
Group: Applications/System
-%description
-Geniwrapper description...
+%description
+Geniwrapper implements the Geni interface which serves as a layer
+between the existing PlanetLab interfaces and the Geni API.
+
+%description sfi
+This package provides the client side of the Geni API, in particular
+sfi.py, together with less important utilities.
%prep
%setup -q
rm -rf $RPM_BUILD_ROOT
make install DESTDIR="$RPM_BUILD_ROOT"
-# hack to add installed files to the package
-python -c "print '\n'.join(['%s*'%i.strip() for i in open('GENI_INSTALLED_FILES').readlines() if not i.strip().endswith('.pyc')])" |uniq > GENI_INSTALLED_FILES.all
-
-%post
-chkconfig --add geni
-
%clean
rm -rf $RPM_BUILD_ROOT
-%files -f GENI_INSTALLED_FILES.all
+%files
%defattr(-,root,root)
-/usr/share/keyconvert
%config (noreplace) /etc/geni/geni_config
-%config (noreplace) /etc/geni/sfi_config
%config (noreplace) /etc/geni/aggregates.xml
%config (noreplace) /etc/geni/registries.xml
+/usr/share/keyconvert/
+/etc/init.d/geni
+%{_bindir}/geni-config-tty
+%{_bindir}/gimport.py*
+%{_bindir}/plc.py*
+%{python_sitelib}/*
+
+%files sfi
+%config (noreplace) /etc/geni/sfi_config
+%{_bindir}/sfi.py*
+%{_bindir}/getNodes.py*
+%{_bindir}/getRecord.py*
+%{_bindir}/setRecord.py*
+%{_bindir}/genidump.py*
%post
-chmod 0744 /etc/init.d/geniwrapper
+chkconfig --add geni
%changelog
* Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-7