added spec file in order to build the RPM
authorGiovanni Gherdovich <ggherdov@brentaal.inria.fr>
Fri, 24 Sep 2010 14:35:56 +0000 (16:35 +0200)
committerGiovanni Gherdovich <ggherdov@brentaal.inria.fr>
Fri, 24 Sep 2010 14:35:56 +0000 (16:35 +0200)
Makefile [new file with mode: 0644]
TODO
setup.py [new file with mode: 0644]
sface.spec [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..7d2d4ac
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+#
+## (Re)builds Python metafile (__init__.py) and documentation
+# 
+
+##########
+all:
+       python setup.py build
+
+install: 
+       python setup.py install \
+                   --install-purelib=$(DESTDIR)/$(datadir) \
+                    --install-scripts=$(DESTDIR)/$(bindir) \
+                    --install-data=$(DESTDIR)/$(datadir)
+
diff --git a/TODO b/TODO
index d5ffddd..57f186d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,4 @@
 
 * Better error handling in SfiProcess
 * Support for private keys with passwords
 
 * Better error handling in SfiProcess
 * Support for private keys with passwords
-* XML syntax highlighting
-* XML closing tags (low priority)
 * XML modifiable by the user
\ No newline at end of file
 * XML modifiable by the user
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644 (file)
index 0000000..2f06810
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+"""
+Installation script for the sface, the sfa GUI
+"""
+
+from distutils.core import setup
+
+bins = ['sface-run']
+
+package_dirs = ['sface', 'sface/screens']    
+
+setup(name='sface',
+      packages = package_dirs, 
+      data_files = [],
+      ext_modules = [],
+      py_modules = [],
+      scripts = bins)
+
diff --git a/sface.spec b/sface.spec
new file mode 100644 (file)
index 0000000..331de3f
--- /dev/null
@@ -0,0 +1,62 @@
+%define distro Fedora
+%define distrorelease 12
+%define distroname f12
+%define pldistro onelab
+%define plrelease 5.0
+
+%define url $URL: http://svn.planet-lab.org/svn/sfa/trunk/sfa.spec $
+
+%define name sface
+%define version 0.1
+%define taglevel 1
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Source0: %{name}-%{version}.tar.gz
+License: GPL
+Group: Applications/System
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab %{plrelease}
+URL: %(echo %{url} | cut -d ' ' -f 2)
+Summary: GUI for sfi.py from SFA
+Group: Applications/System
+
+BuildRequires: make
+Requires: python >= 2.5
+Requires: PyQt4
+Requires: sfa-client
+
+%description
+this package provides GUI for sfi.py, i.e.
+the Slice-Based Facility Architecture (SFA) command line interface.
+The GUI let you manage you slices by adding/deleting nodes and viewing
+the slice's RSpec with an XML pretty printer.
+
+%prep
+%setup -q
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}" install
+rm $RPM_BUILD_ROOT/%{_datadir}/*.egg-info
+# symlinking sface to sface-run, relative
+cd $RPM_BUILD_ROOT/%{_bindir}
+ln -sf ./sface-run ./sface
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%{_bindir}/sface
+%{_bindir}/sface-run
+%{_datadir}/sface/*
+