summaryrefslogtreecommitdiff
path: root/net/isc-dhcp4
diff options
context:
space:
mode:
authoradrianp <adrianp>2008-02-13 22:03:58 +0000
committeradrianp <adrianp>2008-02-13 22:03:58 +0000
commit66406a6ed43e710b33944354c9c328a4ea6154fd (patch)
tree530f73d97d6a220ef98e6bf8702b4a0abd79db58 /net/isc-dhcp4
parentcd99e86b90ca2b65a734bfa3cbcd161cb236d7b2 (diff)
downloadpkgsrc-66406a6ed43e710b33944354c9c328a4ea6154fd.tar.gz
ISC's Dynamic Host Configuration Protocol Distribution provides a
freely redistributable reference implementation of all aspects of DHCP, through a suite of DHCP tools: * A DHCP server * A DHCP client * A DHCP relay agent These tools all use a modular API which is designed to be sufficiently general that it can easily be made to work on POSIX-compliant operating systems and also non-POSIX systems like Windows NT and MacOS. The DHCP server, client and relay agent are provided both as reference implementations of the protocol and as working, fully-featured sample implementations. Both the client and the server provide functionality that, while not strictly required by the protocol, is very useful in practice. The DHCP server also makes allowances for non-compliant clients which one might still like to support. This package contains the Base component.
Diffstat (limited to 'net/isc-dhcp4')
-rw-r--r--net/isc-dhcp4/DESCR21
-rw-r--r--net/isc-dhcp4/Makefile21
-rw-r--r--net/isc-dhcp4/Makefile.common43
-rw-r--r--net/isc-dhcp4/PLIST29
-rw-r--r--net/isc-dhcp4/buildlink3.mk19
-rw-r--r--net/isc-dhcp4/distinfo7
-rwxr-xr-xnet/isc-dhcp4/files/isc_dhclient.sh33
-rwxr-xr-xnet/isc-dhcp4/files/isc_dhcpd.sh36
-rwxr-xr-xnet/isc-dhcp4/files/isc_dhcrelay.sh33
-rw-r--r--net/isc-dhcp4/options.mk15
-rw-r--r--net/isc-dhcp4/patches/patch-aa18
-rw-r--r--net/isc-dhcp4/patches/patch-ab18
12 files changed, 293 insertions, 0 deletions
diff --git a/net/isc-dhcp4/DESCR b/net/isc-dhcp4/DESCR
new file mode 100644
index 00000000000..9bb7b30953c
--- /dev/null
+++ b/net/isc-dhcp4/DESCR
@@ -0,0 +1,21 @@
+ISC's Dynamic Host Configuration Protocol Distribution provides a
+freely redistributable reference implementation of all aspects of
+DHCP, through a suite of DHCP tools:
+
+* A DHCP server
+* A DHCP client
+* A DHCP relay agent
+
+These tools all use a modular API which is designed to be sufficiently
+general that it can easily be made to work on POSIX-compliant
+operating systems and also non-POSIX systems like Windows NT and
+MacOS.
+
+The DHCP server, client and relay agent are provided both as
+reference implementations of the protocol and as working, fully-featured
+sample implementations. Both the client and the server provide
+functionality that, while not strictly required by the protocol,
+is very useful in practice. The DHCP server also makes allowances
+for non-compliant clients which one might still like to support.
+
+This package contains the Base component.
diff --git a/net/isc-dhcp4/Makefile b/net/isc-dhcp4/Makefile
new file mode 100644
index 00000000000..a7fcf2c900e
--- /dev/null
+++ b/net/isc-dhcp4/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+#
+
+COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Base
+COMPONENT= base
+SUBDIR= includes common minires dst
+
+.include "options.mk"
+
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/isc-dhcp-${COMPONENT}
+
+ ${INSTALL_DATA} ${WRKSRC}/README \
+ ${PREFIX}/share/doc/isc-dhcp-${COMPONENT}
+ ${INSTALL_DATA} ${WRKSRC}/RELNOTES \
+ ${PREFIX}/share/doc/isc-dhcp-${COMPONENT}
+ ${INSTALL_DATA} ${WRKSRC}/doc/References.txt \
+ ${PREFIX}/share/doc/isc-dhcp-${COMPONENT}
+
+.include "../../net/isc-dhcp4/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/isc-dhcp4/Makefile.common b/net/isc-dhcp4/Makefile.common
new file mode 100644
index 00000000000..cf090493270
--- /dev/null
+++ b/net/isc-dhcp4/Makefile.common
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+#
+# used by net/isc-dhcp4/Makefile
+# used by net/isc-dhcpd4/Makefile
+# used by net/isc-dhclient4/Makefile
+# used by net/isc-dhcrelay4/Makefile
+
+DISTNAME= dhcp-4.0.0
+PKGNAME= ${DISTNAME:S/dhcp/isc-dhcp-${COMPONENT}/}
+CATEGORIES= net
+MASTER_SITES= http://ftp.isc.org/isc/dhcp/
+
+MAINTAINER= adrianp@NetBSD.org
+HOMEPAGE= http://www.isc.org/sw/dhcp/dhcp4_0.php
+
+CONFLICTS+= isc-dhcp-base-3.*{,nb*}
+
+.include "../../mk/bsd.prefs.mk"
+
+GNU_CONFIGURE= yes
+DHCP_HOME?= ${VARBASE}/db/isc-dhcp
+DHCP_PID?= ${VARBASE}/run/isc-dhcp
+PKG_SYSCONFSUBDIR= dhcp
+
+FILESDIR= ${.CURDIR}/../isc-dhcp4/files
+PATCHDIR= ${.CURDIR}/../isc-dhcp4/patches
+EGDIR= ${PREFIX}/share/examples/isc-dhcp-${COMPONENT}
+BUILD_DEFS+= VARBASE DHCP_HOME DHCP_PID
+
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= --with-srv-lease-file=${DHCP_HOME}/dhcpd.leases
+CONFIGURE_ARGS+= --with-cli-lease-file=${DHCP_HOME}/dhclient.leases
+CONFIGURE_ARGS+= --with-srv-pid-file=${DHCP_PID}/isc-dhcpd.pif
+CONFIGURE_ARGS+= --with-cli-pid-file=${DHCP_PID}/isc-dhclient.pid
+CONFIGURE_ARGS+= --with-relay-pid-file=${DHCP_PID}/isc-dhcrelay.pid
+
+do-install:
+. for d in ${SUBDIR}
+ cd ${WRKSRC}/${d} && ${SETENV} ${MAKE_ENV} ${MAKE} install
+. endfor
+
+.include "../../security/openssl/buildlink3.mk"
diff --git a/net/isc-dhcp4/PLIST b/net/isc-dhcp4/PLIST
new file mode 100644
index 00000000000..4a9a4e29cb9
--- /dev/null
+++ b/net/isc-dhcp4/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+include/isc-dhcp/boolean.h
+include/isc-dhcp/commandline.h
+include/isc-dhcp/dst.h
+include/isc-dhcp/formatcheck.h
+include/isc-dhcp/int.h
+include/isc-dhcp/lang.h
+include/isc-dhcp/list.h
+include/isc-dhcp/mem.h
+include/isc-dhcp/print.h
+include/isc-dhcp/result.h
+include/isc-dhcp/string.h
+include/isc-dhcp/types.h
+include/omapip/alloc.h
+include/omapip/buffer.h
+include/omapip/convert.h
+include/omapip/hash.h
+include/omapip/omapip.h
+include/omapip/omapip_p.h
+include/omapip/trace.h
+lib/libdst.a
+man/man5/dhcp-eval.5
+man/man5/dhcp-options.5
+share/doc/isc-dhcp-base/README
+share/doc/isc-dhcp-base/RELNOTES
+share/doc/isc-dhcp-base/References.txt
+@dirrm share/doc/isc-dhcp-base
+@dirrm include/isc-dhcp
+@dirrm include/omapip
diff --git a/net/isc-dhcp4/buildlink3.mk b/net/isc-dhcp4/buildlink3.mk
new file mode 100644
index 00000000000..76907e0c2c5
--- /dev/null
+++ b/net/isc-dhcp4/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+ISC_DHCP_BASE_BUILDLINK3_MK:= ${ISC_DHCP_BASE_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= isc-dhcp-base
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nisc-dhcp-base}
+BUILDLINK_PACKAGES+= isc-dhcp-base
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}isc-dhcp-base
+
+.if ${ISC_DHCP_BASE_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.isc-dhcp-base+= isc-dhcp-base>=4.0.0
+BUILDLINK_PKGSRCDIR.isc-dhcp-base?= ../../net/isc-dhcp4
+.endif # ISC_DHCP_BASE_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/net/isc-dhcp4/distinfo b/net/isc-dhcp4/distinfo
new file mode 100644
index 00000000000..924842e44d9
--- /dev/null
+++ b/net/isc-dhcp4/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+
+SHA1 (dhcp-4.0.0.tar.gz) = acb4ab7634ba002893b15baba1443ef4d6c92201
+RMD160 (dhcp-4.0.0.tar.gz) = 86963598124617bc7d1059262c75176db431f26d
+Size (dhcp-4.0.0.tar.gz) = 1043725 bytes
+SHA1 (patch-aa) = 162f8950cfcbb9647b81d8d1518867aaf8ec7905
+SHA1 (patch-ab) = cd38b5075d2f3a3121fb7dc9f870a6091c603ef1
diff --git a/net/isc-dhcp4/files/isc_dhclient.sh b/net/isc-dhcp4/files/isc_dhclient.sh
new file mode 100755
index 00000000000..4134b932ee2
--- /dev/null
+++ b/net/isc-dhcp4/files/isc_dhclient.sh
@@ -0,0 +1,33 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: isc_dhclient.sh,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+#
+
+# PROVIDE: dhclient
+# REQUIRE: network mountcritlocal
+# BEFORE: NETWORKING
+#
+# Note that there no syslog logging of dhclient messages at boot because
+# dhclient needs to start before services that syslog depends upon do.
+#
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="dhclient"
+rcvar="isc_${name}"
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/isc-dhcp/isc-${name}.pid"
+start_precmd="isc_dhclient_precmd"
+
+isc_dhclient_precmd()
+{
+ if [ ! -d @VARBASE@/run/isc-dhcp ]; then
+ @MKDIR@ @VARBASE@/run/isc-dhcp
+ @CHMOD@ 0770 @VARBASE@/run/isc-dhcp
+ fi
+}
+
+load_rc_config $rcvar
+run_rc_command "$1"
diff --git a/net/isc-dhcp4/files/isc_dhcpd.sh b/net/isc-dhcp4/files/isc_dhcpd.sh
new file mode 100755
index 00000000000..5ad79967233
--- /dev/null
+++ b/net/isc-dhcp4/files/isc_dhcpd.sh
@@ -0,0 +1,36 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: isc_dhcpd.sh,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+#
+
+# PROVIDE: dhcpd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="dhcpd"
+rcvar="isc_${name}"
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/isc-dhcp/isc-${name}.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+start_precmd="isc_dhcpd_precmd"
+
+isc_dhcpd_precmd()
+{
+ if [ ! -d @VARBASE@/run/isc-dhcp ]; then
+ @MKDIR@ @VARBASE@/run/isc-dhcp
+ @CHMOD@ 0770 @VARBASE@/run/isc-dhcp
+ fi
+
+ if [ ! -f @DHCP_HOME@/dhcpd.leases ]; then
+ @MKDIR@ @DHCP_HOME@
+ @TOUCH@ @DHCP_HOME@/dhcpd.leases
+ @CHMOD@ 0640 @DHCP_HOME@/dhcpd.leases
+ fi
+}
+
+load_rc_config $rcvar
+run_rc_command "$1"
diff --git a/net/isc-dhcp4/files/isc_dhcrelay.sh b/net/isc-dhcp4/files/isc_dhcrelay.sh
new file mode 100755
index 00000000000..bbe0ac46117
--- /dev/null
+++ b/net/isc-dhcp4/files/isc_dhcrelay.sh
@@ -0,0 +1,33 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: isc_dhcrelay.sh,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+#
+
+# PROVIDE: dhcrelay
+# REQUIRE: DAEMON
+# BEFORE: NETWORKING
+#
+# Note that there no syslog logging of dhclient messages at boot because
+# dhclient needs to start before services that syslog depends upon do.
+#
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="dhcrelay"
+rcvar="isc_${name}"
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/isc-dhcp/isc-${name}.pid"
+start_precmd="isc_dhcrelay_precmd"
+
+isc_dhcrelay_precmd()
+{
+ if [ ! -d @VARBASE@/run/isc-dhcp ]; then
+ @MKDIR@ @VARBASE@/run/isc-dhcp
+ @CHMOD@ 0770 @VARBASE@/run/isc-dhcp
+ fi
+}
+
+load_rc_config $rcvar
+run_rc_command "$1"
diff --git a/net/isc-dhcp4/options.mk b/net/isc-dhcp4/options.mk
new file mode 100644
index 00000000000..87ec4f7d76e
--- /dev/null
+++ b/net/isc-dhcp4/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.dhcp
+PKG_SUPPORTED_OPTIONS+= inet6
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Enable ipv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-dhcpv6
+.else
+CONFIGURE_ARGS+= --disable-dhcpv6
+.endif
diff --git a/net/isc-dhcp4/patches/patch-aa b/net/isc-dhcp4/patches/patch-aa
new file mode 100644
index 00000000000..d74f991b82b
--- /dev/null
+++ b/net/isc-dhcp4/patches/patch-aa
@@ -0,0 +1,18 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+
+--- server/Makefile.in.orig 2007-12-14 18:26:36.000000000 +0000
++++ server/Makefile.in
+@@ -367,13 +367,6 @@ uninstall-man8:
+ done
+ install-dist_sysconfDATA: $(dist_sysconf_DATA)
+ @$(NORMAL_INSTALL)
+- test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
+- @list='$(dist_sysconf_DATA)'; for p in $$list; do \
+- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- f=$(am__strip_dir) \
+- echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \
+- $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \
+- done
+
+ uninstall-dist_sysconfDATA:
+ @$(NORMAL_UNINSTALL)
diff --git a/net/isc-dhcp4/patches/patch-ab b/net/isc-dhcp4/patches/patch-ab
new file mode 100644
index 00000000000..6b4d9598086
--- /dev/null
+++ b/net/isc-dhcp4/patches/patch-ab
@@ -0,0 +1,18 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+
+--- client/Makefile.in.orig 2007-12-14 18:26:07.000000000 +0000
++++ client/Makefile.in
+@@ -347,13 +347,6 @@ uninstall-man8:
+ done
+ install-dist_sysconfDATA: $(dist_sysconf_DATA)
+ @$(NORMAL_INSTALL)
+- test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
+- @list='$(dist_sysconf_DATA)'; for p in $$list; do \
+- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- f=$(am__strip_dir) \
+- echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \
+- $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \
+- done
+
+ uninstall-dist_sysconfDATA:
+ @$(NORMAL_UNINSTALL)