first and very rough attempt at building for debian
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 14 May 2014 12:29:14 +0000 (14:29 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 14 May 2014 12:29:14 +0000 (14:29 +0200)
the way the 3 packages (lib, lxc, vs) are intermixed makes it hard under debian
I might want to rework the rpm packaging first

Makefile
debian/changelog.in [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/nodemanager-lib.install [new file with mode: 0644]
debian/nodemanager-lib.postinst [new file with mode: 0755]
debian/nodemanager-lxc.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]

index 52a7f7a..5648041 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,35 @@ clean:
 
 .PHONY: all install clean
 
-##########
+#################### debian-related
+# This is called from the build with the following variables set 
+# (see build/Makefile and target_debian)
+# (.) RPMTARBALL
+# (.) RPMVERSION
+# (.) RPMRELEASE
+# (.) RPMNAME
+DEBVERSION=$(RPMVERSION).$(RPMRELEASE)
+DEBTARBALL=../$(RPMNAME)_$(DEBVERSION).orig.tar.bz2
+DATE=$(shell date -u +"%a, %d %b %Y %T")
+force:
+
+debian: debian/changelog debian.source debian.package
+
+debian/changelog: debian/changelog.in
+       sed -e "s|@VERSION@|$(DEBVERSION)|" -e "s|@DATE@|$(DATE)|" debian/changelog.in > debian/changelog
+
+debian.source: force 
+       rsync -a $(RPMTARBALL) $(DEBTARBALL)
+
+debian.package:
+       debuild --set-envvar PREFIX=/usr -uc -us -b
+
+debian.clean:
+       $(MAKE) -f debian/rules clean
+       rm -rf build/ MANIFEST ../*.tar.gz ../*.dsc ../*.build
+       find . -name '*.pyc' -delete
+
+################################################## devel-oriented
 tags:
        (find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' ; ls initscripts/*) | xargs etags 
 
diff --git a/debian/changelog.in b/debian/changelog.in
new file mode 100644 (file)
index 0000000..f52d7ec
--- /dev/null
@@ -0,0 +1,5 @@
+nodemanager (@VERSION@) UNRELEASED; urgency=low
+
+  * Initial release. 
+
+ -- Thierry Parmentelat <thierry.parmentelat@inria.fr>  @DATE@ +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..2f9d448
--- /dev/null
@@ -0,0 +1,21 @@
+Source: nodemanager
+Maintainer: Thierry Parmentelat <Thierry.Parmentelat@inria.fr>
+Section: misc
+Priority: optional
+Standards-Version: 3.9.2
+# hopefully we do not need manifold at build-time 
+Build-Depends: devscripts, debhelper (>=7.0.50~), debconf, dpatch, python-setuptools, make
+X-Python-Version: >= 2.7
+
+Package: nodemanager-lib
+Architecture: any
+# xxx sliceimage-%{slicefamily} not mentioned here yet
+Depends: python, python-curl, gnupg, pyplnet >= 4.3, plnode-utils
+Description: Generic nodemanager framework
+
+Package: nodemanager-lxc
+Architecture: any
+# xxx lxc-sliceimage not mentioned here yet
+Depends: libvirt, libvirt-python, openvswitch, python-inotify, nodemanager-lib, 
+Description: Nodemanager variant for lxc-containers
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/nodemanager-lib.install b/debian/nodemanager-lib.install
new file mode 100644 (file)
index 0000000..fd39926
--- /dev/null
@@ -0,0 +1,6 @@
+usr/share/NodeManager/
+usr/bin/forward_api_calls
+etc/init.d/
+etc/logrotate.d/nodemanager
+var/lib/nodemanager/
+etc/sysconfig/nodemanager
diff --git a/debian/nodemanager-lib.postinst b/debian/nodemanager-lib.postinst
new file mode 100755 (executable)
index 0000000..6bcbd05
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+set -x 
+echo "No postinsatll script for nodemanager-lib yet"
diff --git a/debian/nodemanager-lxc.install b/debian/nodemanager-lxc.install
new file mode 100644 (file)
index 0000000..53ddcd1
--- /dev/null
@@ -0,0 +1 @@
+usr/share/NodeManager
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..5df3ce4
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DEB_PYTHON_SETUP_CMD = setup-lib.py
+
+%:
+       dh $@ --with python2 --buildsystem=python_distutils
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)