Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* add new package [https://www.isc.org/downloads/DHCP/ ISC DHCP]

 * refs [http://www.ip-phone-forum.de/showthread.php?t=266248 this thread]
 * compile-tested only


git-svn-id: file:///var/svn/freetz/trunk@11730 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
commit bdbe59992b5b1aba8f7b081becd18cc083b3702c 1 parent b99e3e5
er13 authored
View
1  CHANGELOG
@@ -28,6 +28,7 @@ Latest changes:
* autossh 1.4c
* avm-forwarding 0.0.1
* cntlm 0.93beta5
+ * ISC dhcp 4.2.5-P1
* E-MailRelay 1.8.2
* iksemel 1.5-git
* libavmacl2 (taken from AVM's 7490.06.01 open-source package)
View
9 make/isc-dhcp/Config.in
@@ -0,0 +1,9 @@
+config FREETZ_PACKAGE_ISC_DHCP
+ bool "ISC dhcp 4.2.5-P1 (binary only)"
+ default n
+ help
+ ISC DHCP is open source software that implements the Dynamic Host Configuration Protocol
+ for connection to an IP network. It is production-grade software that offers a complete
+ solution for implementing DHCP servers, relay agents, and clients for small local networks
+ to large enterprises. ISC DHCP solution supports both IPv4 and IPv6, and is suitable
+ for use in high-volume and high-reliability applications.
View
1  make/isc-dhcp/external.files
@@ -0,0 +1 @@
+[ "$EXTERNAL_FREETZ_PACKAGE_ISC_DHCP" == "y" ] && EXTERNAL_FILES+=" /usr/sbin/isc-dhcpd"
View
7 make/isc-dhcp/external.in
@@ -0,0 +1,7 @@
+config EXTERNAL_FREETZ_PACKAGE_ISC_DHCP
+ depends on EXTERNAL_ENABLED && FREETZ_PACKAGE_ISC_DHCP
+ bool "ISC dhcp"
+ default n
+ help
+ externals the following file(s):
+ /usr/sbin/isc-dhcpd
View
60 make/isc-dhcp/isc-dhcp.mk
@@ -0,0 +1,60 @@
+$(call PKG_INIT_BIN, 4.2.5-P1)
+$(PKG)_SOURCE:=dhcp-$($(PKG)_VERSION).tar.gz
+$(PKG)_SOURCE_MD5:=f68e3c1f00a9af5742bc5e71d567cf93
+$(PKG)_SITE:=http://ftp.isc.org/isc/dhcp/$($(PKG)_VERSION)
+$(PKG)_DIR:=$($(PKG)_SOURCE_DIR)/dhcp-$($(PKG)_VERSION)
+
+$(PKG)_BINARY:=$($(PKG)_DIR)/server/dhcpd
+$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/sbin/isc-dhcpd
+
+$(PKG)_DEPENDS_ON += bind
+
+$(PKG)_MAKE_OPTIONS := -C $($(PKG)_DIR)
+
+$(PKG)_AVOID_AUTORECONF:=y
+
+ifeq ($($(PKG)_AVOID_AUTORECONF),y)
+# do not process bind subdir while making dhcp
+$(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e '/^SUBDIRS[ \t]*=/ s,bind,,' Makefile.in;
+# replace ../bind and ../../bind with $(libbind) in all Makefile.in's
+$(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e 's,(../)+bind/,$$$$(libbind)/,g' `find . -name Makefile.in`;
+$(PKG)_MAKE_OPTIONS += libbind="$(BIND_EXPORT_LIB_DIR)"
+else
+# this branch requires 010-external_libbind_support.patch
+$(PKG)_CONFIGURE_PRE_CMDS += autoreconf -f -i;
+endif
+
+$(PKG)_CONFIGURE_PRE_CMDS += $(call PKG_PREVENT_RPATH_HARDCODING,./configure)
+
+$(PKG)_CONFIGURE_OPTIONS += --with-libbind="$(BIND_EXPORT_LIB_DIR)"
+
+# add EXTRA_CFLAGS, EXTRA_LDFLAGS variables to all Makefile.in's
+$(PKG)_CONFIGURE_PRE_CMDS += $(SED) -i -r -e 's,^((C|LD)FLAGS)[ \t]*=[ \t]*@\1@,& $$$$(EXTRA_\1),' `find . -name Makefile.in`;
+
+# reduce binary size by setting appropriate CFLAGS/LDFLAGS
+$(PKG)_MAKE_OPTIONS += EXTRA_CFLAGS="-ffunction-sections -fdata-sections"
+$(PKG)_MAKE_OPTIONS += EXTRA_LDFLAGS="-Wl,--gc-sections"
+
+$(PKG)_CONFIGURE_ENV += ac_cv_file__dev_random=yes
+
+$(PKG_SOURCE_DOWNLOAD)
+$(PKG_UNPACKED)
+$(PKG_CONFIGURED_CONFIGURE)
+
+$($(PKG)_BINARY): $($(PKG)_DIR)/.configured
+ $(SUBMAKE) $(ISC_DHCP_MAKE_OPTIONS)
+
+$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY)
+ $(INSTALL_BINARY_STRIP)
+
+$(pkg):
+
+$(pkg)-precompiled: $($(PKG)_TARGET_BINARY)
+
+$(pkg)-clean:
+ -$(SUBMAKE) $(ISC_DHCP_MAKE_OPTIONS) clean
+
+$(pkg)-uninstall:
+ $(RM) $(ISC_DHCP_TARGET_BINARY)
+
+$(PKG_FINISH)
View
156 make/isc-dhcp/patches/010-external_libbind_support.patch.unused
@@ -0,0 +1,156 @@
+--- configure.ac
++++ configure.ac
+@@ -578,6 +578,7 @@
+ #include <sys/socket.h>
+ ])
+
++internal_libbind="\${top_srcdir}/bind"
+ libbind=
+ AC_ARG_WITH(libbind,
+ AC_HELP_STRING([--with-libbind=PATH],
+@@ -586,15 +587,17 @@
+ use_libbind="$withval", use_libbind="no")
+ case "$use_libbind" in
+ yes)
+- libbind="\${top_srcdir}/bind"
++ libbind="$internal_libbind"
+ ;;
+ no)
+- libbind="\${top_srcdir}/bind"
++ libbind="$internal_libbind"
+ ;;
+ *)
+ libbind="$use_libbind"
+ ;;
+ esac
++AM_CONDITIONAL(USE_INTERNAL_LIBBIND, test "$libbind" = "$internal_libbind")
++AC_SUBST([libbind])
+
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+--- Makefile.am
++++ Makefile.am
+@@ -22,7 +22,11 @@
+ bind/Makefile bind/bind.tar.gz bind/version.tmp \
+ common/tests/Atffile server/tests/Atffile
+
+-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
++SUBDIRS =
++if USE_INTERNAL_LIBBIND
++SUBDIRS += bind
++endif
++SUBDIRS += includes tests common dst omapip client dhcpctl relay server
+
+ nobase_include_HEADERS = dhcpctl/dhcpctl.h
+
+--- client/Makefile.am
++++ client/Makefile.am
+@@ -1,3 +1,4 @@
++libbind = @libbind@
+ dist_sysconf_DATA = dhclient.conf.example
+ sbin_PROGRAMS = dhclient
+ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
+@@ -5,7 +6,7 @@
+ scripts/netbsd scripts/nextstep scripts/openbsd \
+ scripts/solaris scripts/openwrt
+ dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+- ../bind/lib/libdns.a ../bind/lib/libisc.a
++ $(libbind)/lib/libdns.a $(libbind)/lib/libisc.a
+ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
+ EXTRA_DIST = $(man_MANS)
+
+--- common/tests/Makefile.am
++++ common/tests/Makefile.am
+@@ -1,5 +1,7 @@
+ SUBDIRS = .
+
++libbind = @libbind@
++
+ AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
+
+ EXTRA_DIST = Atffile
+@@ -13,8 +15,8 @@
+ alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
+ alloc_unittest_LDADD = $(ATF_LDFLAGS)
+ alloc_unittest_LDADD += ../libdhcp.a \
+- ../../omapip/libomapi.a ../../bind/lib/libdns.a \
+- ../../bind/lib/libisc.a
++ ../../omapip/libomapi.a $(libbind)/lib/libdns.a \
++ $(libbind)/lib/libisc.a
+
+ check: $(ATF_TESTS)
+ atf-run | atf-report
+--- dhcpctl/Makefile.am
++++ dhcpctl/Makefile.am
+@@ -1,3 +1,4 @@
++libbind = @libbind@
+ bin_PROGRAMS = omshell
+ lib_LIBRARIES = libdhcpctl.a
+ noinst_PROGRAMS = cltest
+@@ -6,10 +7,10 @@
+
+ omshell_SOURCES = omshell.c
+ omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+- ../bind/lib/libdns.a ../bind/lib/libisc.a
++ $(libbind)/lib/libdns.a $(libbind)/lib/libisc.a
+
+ libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
+
+ cltest_SOURCES = cltest.c
+ cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+- ../bind/lib/libdns.a ../bind/lib/libisc.a
+\ No newline at end of file
++ $(libbind)/lib/libdns.a $(libbind)/lib/libisc.a
+\ No newline at end of file
+--- omapip/Makefile.am
++++ omapip/Makefile.am
+@@ -1,3 +1,5 @@
++libbind = @libbind@
++
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+
+@@ -10,5 +12,5 @@
+ EXTRA_DIST = $(man_MANS)
+
+ svtest_SOURCES = test.c
+-svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
++svtest_LDADD = libomapi.a $(libbind)/lib/libdns.a $(libbind)/lib/libisc.a
+
+--- relay/Makefile.am
++++ relay/Makefile.am
+@@ -1,9 +1,11 @@
++libbind = @libbind@
++
+ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
+
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
+ dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+- ../bind/lib/libdns.a ../bind/lib/libisc.a
++ $(libbind)/lib/libdns.a $(libbind)/lib/libisc.a
+ man_MANS = dhcrelay.8
+ EXTRA_DIST = $(man_MANS)
+
+--- server/Makefile.am
++++ server/Makefile.am
+@@ -4,6 +4,8 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+
++libbind = @libbind@
++
+ AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+
+ dist_sysconf_DATA = dhcpd.conf.example
+@@ -14,8 +16,8 @@
+
+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
+ dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+- ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
+- ../bind/lib/libisc.a
++ ../dhcpctl/libdhcpctl.a $(libbind)/lib/libdns.a \
++ $(libbind)/lib/libisc.a
+
+ man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
+ EXTRA_DIST = $(man_MANS)
Please sign in to comment.
Something went wrong with that request. Please try again.