Hi,

if someone is interested in developing connman in maemo environment,
then the following patches might be useful.

The patches can be used to create connman debian packages in Maemo
frementle environment. The patches might work with Maemo diablo
release also but I have not really tested that. The actual connman
needs some patching in diablo as the dbus version in diablo is quite
old.

Enjoy!


Jukka
From 2a846591430024ddeea078a6130ef6d5c07eaa43 Mon Sep 17 00:00:00 2001
From: Jukka Rissanen <[email protected]>
Date: Tue, 30 Dec 2008 14:42:25 +0200
Subject: [PATCH 1/2] Cleanup debian package directory


Signed-off-by: Jukka Rissanen <[email protected]>
---
 Makefile.am |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 78c98b8..b18fb84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,3 +12,15 @@ DISTCLEANFILES = $(pkgconfig_DATA)
 MAINTAINERCLEANFILES = Makefile.in \
 	aclocal.m4 configure config.h.in config.sub config.guess \
 	ltmain.sh depcomp missing install-sh mkinstalldirs
+
+# get rid of debian build dirs
+maintainer-clean-local:
+	-rm -rf debian/build debian/tmp \
+		debian/connman \
+		debian/connman-dbg \
+		debian/connman-doc \
+		debian/connman-dev \
+		debian/connman-test \
+		debian/*.debhelper debian/files debian/*.substvars \
+		build-stamp configure-stamp stamp-h.in
+
-- 
1.5.6.3

From fc5510e4f400d1f92c56866910af68f1097abdc4 Mon Sep 17 00:00:00 2001
From: Jukka Rissanen <[email protected]>
Date: Tue, 30 Dec 2008 14:46:11 +0200
Subject: [PATCH 2/2] Maemo debian package files


Signed-off-by: Jukka Rissanen <[email protected]>
---
 debian/changelog            |    5 ++
 debian/compat               |    1 +
 debian/connman-dev.install  |    2 +
 debian/connman-doc.install  |    1 +
 debian/connman-test.install |    2 +
 debian/connman.default      |    2 +
 debian/connman.init         |   49 +++++++++++++++++
 debian/connman.install      |    6 ++
 debian/control              |   42 ++++++++++++++
 debian/rules                |  127 +++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 237 insertions(+), 0 deletions(-)
 create mode 100644 debian/changelog
 create mode 100644 debian/compat
 create mode 100644 debian/connman-dev.install
 create mode 100644 debian/connman-doc.install
 create mode 100644 debian/connman-test.install
 create mode 100644 debian/connman.default
 create mode 100644 debian/connman.init
 create mode 100644 debian/connman.install
 create mode 100644 debian/control
 create mode 100755 debian/rules

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..53881f9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+connman (0.5) unstable; urgency=low
+
+  * Initial release
+
+ -- Jukka Rissanen <[email protected]>  Tue, 30 Dec 2008 11:05:50 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/connman-dev.install b/debian/connman-dev.install
new file mode 100644
index 0000000..65bdff8
--- /dev/null
+++ b/debian/connman-dev.install
@@ -0,0 +1,2 @@
+usr/include/connman
+usr/lib/pkgconfig
diff --git a/debian/connman-doc.install b/debian/connman-doc.install
new file mode 100644
index 0000000..89d3ec9
--- /dev/null
+++ b/debian/connman-doc.install
@@ -0,0 +1 @@
+usr/share/gtk-doc/html/connman
diff --git a/debian/connman-test.install b/debian/connman-test.install
new file mode 100644
index 0000000..afe4012
--- /dev/null
+++ b/debian/connman-test.install
@@ -0,0 +1,2 @@
+usr/bin/*-*
+
diff --git a/debian/connman.default b/debian/connman.default
new file mode 100644
index 0000000..f603537
--- /dev/null
+++ b/debian/connman.default
@@ -0,0 +1,2 @@
+# Set connman options here
+DAEMON_OPTS=""
diff --git a/debian/connman.init b/debian/connman.init
new file mode 100644
index 0000000..cc89187
--- /dev/null
+++ b/debian/connman.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+DAEMON=/usr/sbin/connmand
+PIDFILE=/var/run/connmand.pid
+DESC="Connection Manager"
+
+. /lib/lsb/init-functions
+
+if [ -f /etc/default/connman ] ; then
+	. /etc/default/connman
+fi
+
+set -e
+
+do_start() {
+	start-stop-daemon --start --oknodo \
+		--pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
+}
+
+do_stop() {
+	start-stop-daemon --stop --oknodo --quiet \
+		--pidfile $PIDFILE --exec $DAEMON
+}
+
+case "$1" in
+  start)
+	log_daemon_msg "Starting $DESC"
+	do_start
+	log_end_msg $?
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC"
+	do_stop
+	log_end_msg $?
+	;;
+  restart|force-reload)
+	log_daemon_msg "Restarting $DESC"
+	do_stop
+	sleep 1
+	do_start
+	log_end_msg $?
+	;;
+  *)
+	log_success_msg "Usage: $0 {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/debian/connman.install b/debian/connman.install
new file mode 100644
index 0000000..e4dfda8
--- /dev/null
+++ b/debian/connman.install
@@ -0,0 +1,6 @@
+etc/dbus-1/system.d/connman.conf
+usr/sbin/connmand
+usr/lib/connman/plugins/*.so
+usr/lib/connman/scripts
+usr/share/dbus-1
+
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..7704f55
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,42 @@
+Source: connman
+Priority: optional
+Maintainer: [email protected]
+Build-Depends: debhelper (>> 3.0.0), autotools-dev, libglib2.0-dev, libdbus-glib-1-dev
+Standards-Version: 3.7.2
+Section: net
+
+Package: connman
+Section: net
+Provides: connman
+Replaces: connman
+Architecture: any
+Depends: dbus, dbus-1-utils, ${shlibs:Depends}
+Description: Connection manager
+ This package contains the connection manager daemon
+
+Package: connman-dbg
+Section: net
+Architecture: any
+Depends: connman (= ${Source-Version})
+Description: Debug symbols for connman
+ Debug symbols for connman
+
+Package: connman-doc
+Section: net
+Architecture: any
+Description: Documentation for connman
+ This package contains the documentation for the connman
+
+Package: connman-dev
+Section: net
+Architecture: any
+Depends: libglib2.0-dev
+Description: Development files for connman
+ This package contains header and other development files for the connman
+
+Package: connman-test
+Section: net
+Architecture: any
+Depends: python, connman
+Description: Test scripts for connman
+ This package contains test files for the connman
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6f94c1d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,127 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+# nostrip option
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# use thumb mode if it's enabled
+ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -mthumb
+endif
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	confflags += --enable-debug
+endif
+
+ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
+	confflags += --enable-gtk-doc
+endif
+
+ifneq (,$(findstring dmalloc,$(DEB_BUILD_OPTIONS)))
+	CONFIG_DMALLOC=--enable-dmalloc
+	CFLAGS += -DDMALLOC_ENABLE
+endif
+
+# default flags
+CFLAGS += -g -O2
+
+configure: configure.ac debian/changelog
+	./bootstrap
+
+config.status: configure
+	dh_testdir
+ifneq (,$(findstring docs,$(DEB_BUILD_OPTIONS)))
+	if [ ! -f doc/gtk-doc.make ]; then gtkdocize --copy --docdir doc; fi
+endif
+	# Add here commands to configure the package.
+	 CFLAGS="$(CFLAGS)" ./configure $(confflags) \
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--sysconfdir=/etc \
+		--disable-fake \
+		$(CONFIG_DMALLOC) $*
+
+build: build-stamp
+
+build-stamp:  config.status
+	dh_testdir
+	# Add here commands to compile the package.
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+	# Add here commands to clean up after the build process.
+	-if [ -f Makefile ] ; then $(MAKE) distclean ; fi
+	-test -r /usr/share/misc/config.sub && \
+	  cp -f /usr/share/misc/config.sub config.sub
+	-test -r /usr/share/misc/config.guess && \
+	  cp -f /usr/share/misc/config.guess config.guess
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	# Add here commands to install the package into debian/tmp
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	# Create document dir although it is only used if docs are built
+	-mkdir -p debian/tmp/usr/share/gtk-doc/html/connman
+	# Services file is copied separately
+	# the system-services dir is in use in Maemo Fremantle release
+	-mkdir -p debian/tmp/usr/share/dbus-1/system-services
+	-cp src/connman.service debian/tmp/usr/share/dbus-1/system-services/org.moblin.connman.service
+	# the services dir is in use in Maemo Diablo release
+	-mkdir -p debian/tmp/usr/share/dbus-1/services
+	-cp src/connman.service debian/tmp/usr/share/dbus-1/services/
+	# test scripts to usr/bin
+	-mkdir -p debian/tmp/usr/bin
+	-cp -a test/*-* debian/tmp/usr/bin/
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installchangelogs
+	dh_install --sourcedir=debian/tmp --list-missing -v
+	dh_installinit --  start 59 2 3 4 . stop 15 0 1 5 6 .
+	dh_link
+	dh_strip --dbg-package=connman
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean binary-indep binary-arch binary install 
-- 
1.5.6.3

_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman

Reply via email to