aboutsummaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/dhcdbd
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2007-01-19 20:55:09 +0000
committerRoss Burton <ross@openedhand.com>2007-01-19 20:55:09 +0000
commit776490a40df8d1b4a84a07dd3e13bd10cd4c8bdd (patch)
tree489df56bf4725a99dc095a17cdfe7ef4c680ac82 /meta-extras/packages/dhcdbd
parent6564355fb79604e818722ae3f6acf3dbb0665fca (diff)
downloadopenembedded-core-contrib-776490a40df8d1b4a84a07dd3e13bd10cd4c8bdd.tar.gz
Add dhcp3 and dhcdbd for Network Manager
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1175 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras/packages/dhcdbd')
-rw-r--r--meta-extras/packages/dhcdbd/dhcdbd_2.0.bb25
-rw-r--r--meta-extras/packages/dhcdbd/files/dbus-api-fix.patch20
-rw-r--r--meta-extras/packages/dhcdbd/files/dhcdbd28
-rw-r--r--meta-extras/packages/dhcdbd/files/dhcdbd-1.14-pkgconfig_dbus.patch26
-rw-r--r--meta-extras/packages/dhcdbd/files/no-ext-options.patch13
5 files changed, 112 insertions, 0 deletions
diff --git a/meta-extras/packages/dhcdbd/dhcdbd_2.0.bb b/meta-extras/packages/dhcdbd/dhcdbd_2.0.bb
new file mode 100644
index 0000000000..de9e24abd5
--- /dev/null
+++ b/meta-extras/packages/dhcdbd/dhcdbd_2.0.bb
@@ -0,0 +1,25 @@
+DESCRIPTION="DBus-enabled dhcp client"
+SECTION="net"
+LICENSE="GPL"
+HOMEPAGE="http://people.redhat.com/jvdias/dhcdbd/"
+
+DEPENDS = "dbus"
+RDEPENDS = "dhcp-client"
+
+PR = "r0"
+
+SRC_URI="http://people.redhat.com/dcantrel/dhcdbd/dhcdbd-${PV}.tar.bz2 \
+ file://no-ext-options.patch;patch=1 \
+ file://dhcdbd"
+
+do_compile() {
+ CC=${TARGET_SYS}-gcc DESTDIR=${prefix} make
+}
+
+do_install() {
+ DESTDIR=${D} make install
+ install -d ${D}/etc/init.d
+ install -m 0755 ${WORKDIR}/dhcdbd ${D}/etc/init.d/
+}
+
+FILES_${PN} += "${sysconfdir} ${datadir}/dbus-1 ${base_sbindir}/*"
diff --git a/meta-extras/packages/dhcdbd/files/dbus-api-fix.patch b/meta-extras/packages/dhcdbd/files/dbus-api-fix.patch
new file mode 100644
index 0000000000..ce05fc7bf8
--- /dev/null
+++ b/meta-extras/packages/dhcdbd/files/dbus-api-fix.patch
@@ -0,0 +1,20 @@
+--- /tmp/dbus_service.c 2006-08-24 22:09:14.000000000 +0200
++++ dhcdbd-1.14/dbus_service.c 2006-08-24 22:09:44.228306000 +0200
+@@ -1412,7 +1412,7 @@
+ return ( cs );
+
+ give_up:
+- dbus_connection_disconnect( connection );
++ dbus_connection_close( connection );
+ dbus_shutdown();
+ return ( 0L );
+ }
+@@ -1456,7 +1456,7 @@
+ cs->roots=0L;
+
+
+- dbus_connection_disconnect( cs->connection );
++ dbus_connection_close( cs->connection );
+ dbus_shutdown();
+ free( cs );
+ }
diff --git a/meta-extras/packages/dhcdbd/files/dhcdbd b/meta-extras/packages/dhcdbd/files/dhcdbd
new file mode 100644
index 0000000000..568753c28c
--- /dev/null
+++ b/meta-extras/packages/dhcdbd/files/dhcdbd
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# DHCDBD startup script
+
+. /etc/profile
+
+case $1 in
+ 'start')
+ echo -n "Starting dhcdbd daemon: dhcdbd"
+ /sbin/dhcdbd --system
+ echo "."
+ ;;
+
+ 'stop')
+ echo -n "Stopping dhcdbd: dhcdbd"
+ killall `ps |grep /sbin/dhcdbd | grep -v grep | cut "-d " -f2`
+ echo "."
+ ;;
+
+ 'restart')
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 { start | stop | restart }"
+ ;;
+esac
diff --git a/meta-extras/packages/dhcdbd/files/dhcdbd-1.14-pkgconfig_dbus.patch b/meta-extras/packages/dhcdbd/files/dhcdbd-1.14-pkgconfig_dbus.patch
new file mode 100644
index 0000000000..c2e2151d17
--- /dev/null
+++ b/meta-extras/packages/dhcdbd/files/dhcdbd-1.14-pkgconfig_dbus.patch
@@ -0,0 +1,26 @@
+diff -Naur dhcdbd-1.14/Makefile dhcdbd-1.14-mod/Makefile
+--- dhcdbd-1.14/Makefile 2006-01-17 22:23:51.000000000 +0100
++++ dhcdbd-1.14-mod/Makefile 2006-08-02 18:02:42.000000000 +0200
+@@ -7,8 +7,8 @@
+ LDFLAGS ?= -g
+ DESTDIR ?= /
+ LIBDIR ?= lib
+-DBUS_INCLUDES ?= -I/usr/$(LIBDIR)/dbus-1.0/include -I/usr/include/dbus-1.0
+-DBUS_LIBS ?= -ldbus-1
++DBUS_INCLUDES ?= `pkg-config dbus-1 --cflags`
++DBUS_LIBS ?= `pkg-config dbus-1 --libs`
+ OBJS = dbus_service.o dhcdbd.o dhcp_options.o main.o
+ SRCS = dbus_service.c dhcdbd.c dhcp_options.c main.c
+ INCS = dbus_service.h dhcdbd.h dhcp_options.h includes.h
+diff -Naur dhcdbd-1.14/tests/Makefile dhcdbd-1.14-mod/tests/Makefile
+--- dhcdbd-1.14/tests/Makefile 2006-01-17 22:23:51.000000000 +0100
++++ dhcdbd-1.14-mod/tests/Makefile 2006-08-02 18:11:43.000000000 +0200
+@@ -2,7 +2,7 @@
+ LD = ${CC}
+ CFLAGS ?= -g -Wall
+ LDFLAGS ?= -g
+-DBUS_LIBS ?= -ldbus-1
++DBUS_LIBS ?= `pkg-config dbus-1 --libs`
+
+ all: test_dhcp_options test_dhcdbd_state test_subscriber test_subscriber_dbus test_prospective_subscriber
+
diff --git a/meta-extras/packages/dhcdbd/files/no-ext-options.patch b/meta-extras/packages/dhcdbd/files/no-ext-options.patch
new file mode 100644
index 0000000000..774a2cf140
--- /dev/null
+++ b/meta-extras/packages/dhcdbd/files/no-ext-options.patch
@@ -0,0 +1,13 @@
+Index: dhcdbd-2.0/include/dhcdbd.h
+===================================================================
+--- dhcdbd-2.0.orig/include/dhcdbd.h 2006-10-18 09:38:18.000000000 +0100
++++ dhcdbd-2.0/include/dhcdbd.h 2006-10-18 09:38:45.000000000 +0100
+@@ -76,7 +76,7 @@
+ #endif
+
+ #ifndef DHCLIENT_EXTENDED_OPTION_ENVIRONMENT
+-#define DHCLIENT_EXTENDED_OPTION_ENVIRONMENT 1
++#define DHCLIENT_EXTENDED_OPTION_ENVIRONMENT 0
+ #endif
+
+ #define DHCDBD_INTERFACE_TEXT "text"