-###
-all:
- @echo no default target
+### first purpose, build and install from the specfile
+all: build
force:
+DESTDIR := /
+datadir := /usr/share
+bindir := /usr/bin
+
+PWD := $(shell pwd)
+
+build:
+ python setup.py build
+
+install:
+ python setup.py install \
+ --install-purelib=$(DESTDIR)/$(datadir)/myslice \
+ --install-scripts=$(DESTDIR)/$(datadir)/myslice \
+ --install-data=$(DESTDIR)/$(datadir)/myslice
+
+
#################### compute emacs tags
# list files under git but exclude third-party stuff like bootstrap and jquery
myfiles: force
--- /dev/null
+%define name myslice
+%define version 0.1
+%define taglevel 1
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Summary: MySlice Frontend
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPLv3
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+Vendor: OpenLab
+Packager: OpenLab <thierry.parmentelat@inria.fr>
+URL: %{SCMURL}
+
+# We use set everywhere
+Requires: python >= 2.7
+Requires: Django
+BuildRequires: python-setuptools make
+
+%description
+The MySlice frontend provides a django application that interacts with
+a manifold backend to provide a User-Interface to a federation of
+testbeds.
+
+%prep
+%setup -q
+
+%build
+%{__make} build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%dir %{_datadir}/myslice
+
+%changelog
--- /dev/null
+#!/usr/bin/python
+#
+# Setup script for myslice
+#
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# INRIA (c) 2013
+
+import os.path
+from glob import glob
+from distutils.core import setup
+
+# we don't have a final list os let's keep it simple for now
+packages= [ os.path.dirname(init) for init in (glob("*/__init__.py")+glob("*/*/__init__.py")) ]
+
+setup(packages = packages,
+ scripts = [],
+ data_files = [
+# ( dir [ list of paths from toplevel] ) ,
+ ])