first stab at packaging vsys-wrapper
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 3 Sep 2012 16:08:54 +0000 (18:08 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 3 Sep 2012 16:08:54 +0000 (18:08 +0200)
slice-context/Makefile
slice-context/vsys-wrapper.spec [new file with mode: 0644]

index 0dacbf0..d7b4733 100644 (file)
@@ -2,6 +2,8 @@ SRC = src
 TEST = test
 BUILDDIR = build
 DISTDIR = dist
+# expected to be set from the specfile
+DESTDIR ?= /
 
 SUBBUILDDIR = $(shell python -c 'import distutils.util, sys; print "lib.%s-%s" % (distutils.util.get_platform(), sys.version[0:3])')
 BUILDDIR := $(BUILDDIR)/$(SUBBUILDDIR)
@@ -13,7 +15,7 @@ all:
        ./setup.py build
 
 install: all
-       ./setup.py install
+       ./setup.py install --root=$(DESTDIR)
 
 test: all
        retval=0; \
diff --git a/slice-context/vsys-wrapper.spec b/slice-context/vsys-wrapper.spec
new file mode 100644 (file)
index 0000000..95f9ce9
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Vsys wrapper for slice space
+#
+# RPM spec file
+#
+
+%define name vsys-wrapper
+%define version 0.95
+%define taglevel 43
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab %{plrelease}
+URL: %{SCMURL}
+
+Summary: Vsys Wrapper
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPL
+Group: System Environment/Kernel
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+Source0: vsys-wrapper-%{version}.tar.gz
+
+%description
+Vsys wrapper provides convenience tools for the slice space, so users can more easily leverage vsys-scripts through python wrappers.
+
+%prep 
+%setup
+
+%build
+rm -rf $RPM_BUILD_ROOT
+make -C slice-context
+
+%install
+mkdir -p $RPM_BUILD_ROOT/vsys
+make -C slice-context install DESTDIR="$RPM_BUILD_ROOT"
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/usr/lib*/python*/site-packages
+
+%post
+
+%postun
+
+%changelog