summaryrefslogtreecommitdiff
path: root/package/dhcp
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/dhcp
Initial import
Diffstat (limited to 'package/dhcp')
-rw-r--r--package/dhcp/Config.in30
-rw-r--r--package/dhcp/Makefile37
-rw-r--r--package/dhcp/files/dhcpd.init27
-rw-r--r--package/dhcp/ipkg/dhcp-relay.control4
-rw-r--r--package/dhcp/ipkg/dhcp-server.control4
-rw-r--r--package/dhcp/ipkg/dhcp-server.postinst3
6 files changed, 105 insertions, 0 deletions
diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in
new file mode 100644
index 000000000..37d2aa7b6
--- /dev/null
+++ b/package/dhcp/Config.in
@@ -0,0 +1,30 @@
+#menu "dhcp.............................. ISC DHCP (Dynamic Host Configuration Protocol) implementation"
+
+config ADK_COMPILE_DHCP
+ tristate
+ default n
+ depends ADK_PACKAGE_DHCP_RELAY || ADK_PACKAGE_DHCP_SERVER
+
+config ADK_PACKAGE_DHCP_RELAY
+ prompt "dhcp-relay........................ ISC DHCP relay"
+ tristate
+ default n
+ select ADK_COMPILE_DHCP
+ help
+ ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration
+ Protocol) relay daemon.
+
+ http://www.isc.org/
+
+config ADK_PACKAGE_DHCP_SERVER
+ prompt "dhcp-server....................... ISC DHCP server"
+ tristate
+ default n
+ select ADK_COMPILE_DHCP
+ help
+ ISC (Internet Software Consortium) DHCP (Dynamic Host Configuration
+ Protocol) server daemon.
+
+ http://www.isc.org/
+
+#endmenu
diff --git a/package/dhcp/Makefile b/package/dhcp/Makefile
new file mode 100644
index 000000000..c2e49a0b6
--- /dev/null
+++ b/package/dhcp/Makefile
@@ -0,0 +1,37 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= dhcp
+PKG_VERSION:= 3.0.7
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 426bfa1712ababaff4be6dadee9c1982
+MASTER_SITES:= ftp://ftp.isc.org/isc/dhcp/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,DHCP_SERVER,dhcp-server,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+do-configure:
+ (cd ${WRKBUILD} ; \
+ ./configure --copts "${TARGET_CFLAGS}" linux-2.2 \
+ );
+
+MAKE_FLAGS+= RANLIB=${TARGET_CROSS}ranlib
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_DHCP_RELAY}/usr/sbin
+ ${CP} ${WRKINST}/usr/sbin/dhcrelay ${IDIR_DHCP_RELAY}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_DHCP_SERVER}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_DHCP_SERVER}/usr/sbin
+ ${INSTALL_BIN} ./files/dhcpd.init \
+ ${IDIR_DHCP_SERVER}/etc/init.d/dhcpd
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/dhcpd ${IDIR_DHCP_SERVER}/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/dhcp/files/dhcpd.init b/package/dhcp/files/dhcpd.init
new file mode 100644
index 000000000..31c182948
--- /dev/null
+++ b/package/dhcp/files/dhcpd.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostart)
+ [[ $dhcpd_flags = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ mkdir -p /var/state/dhcp
+ touch /var/state/dhcp/dhcpd.leases
+ dhcpd $dhcpd_flags
+ ;;
+autostop|stop)
+ killall dhcpd
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/dhcp/ipkg/dhcp-relay.control b/package/dhcp/ipkg/dhcp-relay.control
new file mode 100644
index 000000000..fbd3d20b8
--- /dev/null
+++ b/package/dhcp/ipkg/dhcp-relay.control
@@ -0,0 +1,4 @@
+Package: dhcp-relay
+Priority: optional
+Section: net
+Description: ISC DHCP relay
diff --git a/package/dhcp/ipkg/dhcp-server.control b/package/dhcp/ipkg/dhcp-server.control
new file mode 100644
index 000000000..a9b86a183
--- /dev/null
+++ b/package/dhcp/ipkg/dhcp-server.control
@@ -0,0 +1,4 @@
+Package: dhcp-server
+Priority: optional
+Section: net
+Description: ISC DHCP server
diff --git a/package/dhcp/ipkg/dhcp-server.postinst b/package/dhcp/ipkg/dhcp-server.postinst
new file mode 100644
index 000000000..592120cdc
--- /dev/null
+++ b/package/dhcp/ipkg/dhcp-server.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf 'e.g. "eth0.1 eth1"' dhcpd_flags