1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

Maintainer update: isc-dhcp3 splitted to -server, -client, -relay and -devel sub-ports

Step one: convert net/isc-dhcp3 into net/isc-dhcp3-server

PR:		ports/51757
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
This commit is contained in:
Edwin Groothuis 2004-01-17 23:09:02 +00:00
parent aac5a28ba8
commit 6db5748c1e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=98427
36 changed files with 2316 additions and 220 deletions

View File

@ -12,11 +12,11 @@ CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3
PKGNAMESUFFIX= 3-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= cyrille.lefevre@laposte.net
COMMENT= ISC Dynamic Host Configuration Protocol client and server code
COMMENT?= The ISC Dynamic Host Configuration Protocol server
USE_REINPLACE= yes
@ -26,16 +26,32 @@ USE_REINPLACE= yes
#
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --subsys ${SUBSYS}
ALL_TARGET= all.${SUBSYS}
INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.if ${SUBSYS} == client
MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server
MAN1= omshell.1
MAN3= dhcpctl.3 omapi.3 omshell.3
MAN5= dhclient.conf.5 dhclient.leases.5 \
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
dhcpd.leases.5
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
MAN5= dhcpd.conf.5 dhcpd.leases.5
MAN8= dhcpd.8
.elif ${SUBSYS} == relay
MAN8= dhcrelay.8
.else
MAN3= dhcpctl.3 omapi.3
.endif
.if ${SUBSYS} != relay
MAN5+= dhcp-eval.5 dhcp-options.5
.endif
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
PKGMESSAGE= ${.CURDIR}/pkg-message
PLIST= ${.CURDIR}/pkg-plist
# Local variables
#
@ -61,14 +77,32 @@ PATCHLEVEL= pl${PORTVERSION:E}
RELEASE= ${PORTVERSION}
.endif
PATCH_SUBDIRS= common minires dst omapip server client relay dhcpctl
PATCH_SUBDIRS= common minires dst omapip
.if ${SUBSYS} == server || ${SUBSYS} == devel
PATCH_SUBDIRS+= dhcpctl
.endif
.if ${SUBSYS} != devel
PATCH_SUBDIRS+= ${SUBSYS}
.endif
.if ${SUBSYS} == server
PATCH_SUBDIRS+= omshell
.endif
BIN_FILES= dhclient dhcpd dhcrelay omshell
.if ${SUBSYS} == client
BIN_FILES= dhclient
CONF_FILES= dhclient.conf
RC_FILES= isc-dhcpd isc-dhcrelay
SAMP_FILES= client/dhclient.conf
DATA_FILES= dhclient.leases
.elif ${SUBSYS} == server
BIN_FILES= dhcpd omshell
RC_FILES= isc-dhcpd
SAMP_FILES= server/dhcpd.conf
DATA_FILES= dhcpd.leases
.elif ${SUBSYS} == relay
BIN_FILES= dhcrelay
RC_FILES= isc-dhcrelay
.endif
DOC_FILES= ANONCVS CHANGES COPYRIGHT README RELNOTES
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
DATA_FILES= dhclient.leases dhcpd.leases
SAMP_SUFX= .sample
@ -79,6 +113,17 @@ DATADIR= /var/db
STRIP_CMD?= strip
# Post-extract
#
post-extract: extract-omshell
extract-omshell:
@${MKDIR} ${WRKSRC}/omshell
@${MV} ${WRKSRC}/dhcpctl/omshell.? ${WRKSRC}/omshell
@${CP} ${FILESDIR}/omshell::Makefile.dist \
${WRKSRC}/omshell/Makefile.dist
# Post-patch
#

View File

@ -0,0 +1,80 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
# http://www.isc.org/isc-license-1.0.html.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
#
CATMANPAGES = omshell.cat1
SEDMANPAGES = omshell.man1
SRCS = omshell.c
OBJS = omshell.o
PROG = omshell
MAN = omshell.1
INCLUDES = -I$(TOP)/dhcpctl $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
DHCPCTLLIBS = ../dhcpctl/libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
all: $(PROG) $(CATMANPAGES)
$(PROG): $(OBJS) $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPCTLLIBS) $(LIBS)
install: all $(CATMANPAGES)
for dir in $(USRMANDIR) $(USERBINDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
fi; \
done; \
done
$(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
$(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
$(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
$(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
-rm -f $(OBJS)
realclean: clean
-rm -f $(PROG) *~ $(CATMANPAGES) $(SEDMANPAGES) #*
distclean: realclean
-rm -f Makefile
links:
@for foo in $(SRCS) $(MAN); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
ln -s $(TOP)/omshell/$$foo $$foo; \
done
omshell.cat1: omshell.man1
nroff -man omshell.man1 >omshell.cat1
omshell.man1: omshell.1
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -0,0 +1,76 @@
--- Makefile.orig Fri Nov 8 00:10:07 2002
+++ Makefile Mon Apr 28 15:04:50 2003
@@ -38,59 +38,59 @@
# ``http://www.nominum.com''.
#
-all:
+all all.devel all.server all.relay all.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make all); \
+ (cd work.$$sysname; make $@); \
fi
-install:
+install install.devel install.server install.relay install.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make install); \
+ (cd work.$$sysname; make $@); \
fi
-depend:
+depend depend.devel depend.server depend.relay depend.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make depend); \
+ (cd work.$$sysname; make $@); \
fi
-clean:
+clean clean.devel clean.server clean.relay clean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make clean); \
+ (cd work.$$sysname; make $@); \
fi
-realclean:
+realclean realclean.devel realclean.server realclean.relay realclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make realclean); \
+ (cd work.$$sysname; make $@); \
fi
-distclean:
+distclean distclean.devel distclean.server distclean.relay distclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make distclean); \
+ (cd work.$$sysname; make $@); \
fi
-links:
+links links.devel links.server links.relay links.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make links); \
+ (cd work.$$sysname; make $@); \
fi

View File

@ -0,0 +1,243 @@
--- Makefile.dist.orig Fri Nov 8 00:10:08 2002
+++ Makefile.dist Tue Apr 29 00:07:43 2003
@@ -3,13 +3,13 @@
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
+# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
-# http://www.isc.org/isc-license-1.0.html.
+# http://www.isc.org/isc-license-1.0.html.
#
-# This file is part of the ISC DHCP distribution. The documentation
+# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
@@ -17,47 +17,200 @@
# http://www.isc.org for more information.
#
-SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
+COMMON_SUBDIRS= common
+DEVEL_SUBDIRS= $(MINIRES) dst omapip dhcpctl
+SERVER_SUBDIRS= omshell server
+RELAY_SUBDIRS= relay
+CLIENT_SUBDIRS= client
+
+DEVEL_BUILD_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_BUILD_SUBDIRS= ${SERVER_SUBDIRS}
+RELAY_BUILD_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_BUILD_SUBDIRS= ${CLIENT_SUBDIRS}
+
+DEVEL_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
+RELAY_INSTALL_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
-all:
- @for dir in ${SUBDIRS}; do \
+all: all.server all.relay all.client
+
+all.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.server: all.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.relay: all.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.client: all.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making all in $$dir"; \
(cd $$dir; $(MAKE) all) || exit 1; \
- done
+ done
+
+install: install.devel install.server install.relay install.client
+
+install.devel:
+ @for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
-install:
- @for dir in ${SUBDIRS}; do \
+install.server:
+ @for dir in ${SERVER_INSTALL_SUBDIRS}; do \
echo "Installing in $$dir"; \
(cd $$dir; $(MAKE) install) || exit 1; \
- done
+ done
-depend:
- @for dir in ${SUBDIRS}; do \
+install.relay:
+ @for dir in ${RELAY_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+install.client:
+ @for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+depend: depend.server depend.relay depend.client
+
+depend.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.server: depend.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.relay: depend.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
echo "Making dependencies in $$dir"; \
(cd $$dir; $(MAKE) depend) || exit 1; \
- done
+ done
+
+depend.client: depend.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+clean: clean.server clean.relay clean.client
+
+clean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.server: clean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.relay: clean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
-clean:
- @for dir in ${SUBDIRS}; do \
+clean.client: clean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Cleaning in $$dir"; \
(cd $$dir; $(MAKE) clean) || exit 1; \
- done
+ done
+
+realclean: realclean.server realclean.relay realclean.client
+
+realclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
-realclean:
- @for dir in ${SUBDIRS}; do \
+realclean.server: realclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
echo "Really cleaning in $$dir"; \
(cd $$dir; $(MAKE) realclean) || exit 1; \
- done
+ done
-distclean:
- @for dir in ${SUBDIRS}; do \
+realclean.relay: realclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+realclean.client: realclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+distclean: distclean.server distclean.relay distclean.client
+
+distclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
echo "Really, really cleaning in $$dir"; \
(cd $$dir; $(MAKE) distclean) || exit 1; \
- done
- @rm -f Makefile
+ done
+
+distclean.server: distclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.relay: distclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.client: distclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+links: links.server links.relay links.client
+
+links.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.server: links.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.relay: links.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
-links:
- @for dir in ${SUBDIRS}; do \
+links.client: links.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making links in $$dir"; \
(cd $$dir; $(MAKE) links) || exit 1; \
- done
+ done

View File

@ -0,0 +1,41 @@
--- configure.orig Sat Apr 20 23:44:13 2002
+++ configure Mon Apr 28 23:02:10 2003
@@ -13,6 +13,9 @@
elif [ x$1 = x--dirs ]; then
dirs=$2
shift
+ elif [ x$1 = x--subsys ]; then
+ subsys=$2
+ shift
elif [ x$1 = x--no-links ]; then
nolinks=YES
elif [ x$1 = x--copts ]; then
@@ -233,7 +236,14 @@
fi
if [ x"$dirs" = x ]; then
- dirs=". client server relay common omapip dhcpctl minires dst"
+ dirs=". common minires dst omapip dhcpctl"
+ if [ x$subsys = x ]; then
+ dirs="$dirs server omshell client relay"
+ elif [ x$subsys = xserver ]; then
+ dirs="$dirs server omshell"
+ elif [ x$subsys = xclient -o x$subsys = xrelay ]; then
+ dirs="$dirs $subsys"
+ fi
fi
for foo in $dirs; do
@@ -253,7 +263,11 @@
# Make the link tree in which to actually build.
if [ x$nolinks = x ]; then
- make links
+ if [ x$subsys = x ]; then
+ make links
+ else
+ make links.$subsys
+ fi
fi
exit 0

View File

@ -0,0 +1,79 @@
--- dhcpctl/Makefile.dist.orig Mon Apr 28 16:31:57 2003
+++ dhcpctl/Makefile.dist Mon Apr 28 16:24:20 2003
@@ -17,11 +17,11 @@
# http://www.isc.org for more information.
#
-CATMANPAGES = dhcpctl.cat3 omshell.cat1
-SEDMANPAGES = dhcpctl.man3 omshell.man1
+CATMANPAGES = dhcpctl.cat3
+SEDMANPAGES = dhcpctl.man3
SRC = dhcpctl.c callback.c remote.c
OBJ = dhcpctl.o callback.o remote.o
-MAN = dhcpctl.3 omshell.1
+MAN = dhcpctl.3
HDRS = dhcpctl.h
INCLUDES = $(BINDINC) -I$(TOP)/includes
@@ -29,10 +29,7 @@
DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
-all: libdhcpctl.a omshell cltest $(CATMANPAGES)
-
-omshell: omshell.o $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
+all: libdhcpctl.a cltest $(CATMANPAGES)
cltest: cltest.o $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
@@ -43,8 +40,7 @@
$(RANLIB) libdhcpctl.a
install: all $(CATMANPAGES)
- for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
- $(USERBINDIR); do \
+ for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
@@ -64,16 +60,12 @@
$(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
done
- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
- -rm -f $(OBJ) test.o svtest cltest.o cltest
+ -rm -f $(OBJ) cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
@@ -82,7 +74,7 @@
-rm -f Makefile
links:
- @for foo in $(SRC) $(MAN) omshell.c cltest.c $(HDRS); do \
+ @for foo in $(SRC) $(MAN) cltest.c $(HDRS); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
@@ -95,12 +87,5 @@
dhcpctl.man3: dhcpctl.3
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
-
-omshell.cat1: omshell.man1
- nroff -man omshell.man1 >omshell.cat1
-
-omshell.man1: omshell.1
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -2,7 +2,7 @@ The ISC Dynamic Host Configuration Protocol Distribution provides a
freely redistributable reference implementation of all aspects of the
DHCP protocol, through a suite of DHCP tools:
* A DHCP server
* A DHCP server (this port)
* A DHCP client
* A DHCP relay agent

View File

@ -1,11 +1,3 @@
**** To setup dhclient, you may need to edit /etc/rc.conf to replace the
base system dhclient, such as :
dhcp_program="%%PREFIX%%/sbin/dhclient"
dhcp_flags="-q"
See dhclient(8), using the following command, for details about other
possible options:
MANPATH=%%MAN1PREFIX%%/man man 8 dhclient
**** To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
to %%PREFIX%%/etc/dhcpd.conf for editing. You also have to rename
%%PREFIX%%/etc/rc.d/isc-dhcpd.sh.sample to %%PREFIX%%/etc/rc.d/isc-\
@ -13,11 +5,3 @@
%%PREFIX%%/etc/rc.isc-dhcpd.conf may be edited to tune some startup
variables such as `dhcpd_options' or `dhcpd_ifaces', both defaulted
to `nothing'. See dhcpd(8) for details about possible options.
**** To setup dhcrelay, you have to rename %%PREFIX%%/etc/rc.d/isc-\
dhcrelay.sh.sample to %%PREFIX%%/etc/rc.d/isc-dhcrelay.sh to
enable automatic startup.
%%PREFIX%%/etc/rc.isc-dhcrelay.conf may need to be edited to setup
the `dhcrelay_servers' as required. If needed, you may also tune
`dhcrelay_options' and `dhcrelay_ifaces', both defaulted to `nothing'.
See dhcrelay(8) for details about possible options.

View File

@ -1,36 +1,12 @@
@comment $FreeBSD$
bin/omshell
etc/dhclient.conf.sample
@exec [ -f %D/etc/dhclient.conf ] || touch %D/etc/dhclient.conf
@unexec [ -L %D/etc/dhclient.conf -o -s %D/etc/dhclient.conf ] || rm -f %D/etc/dhclient.conf
etc/dhcpd.conf.sample
@unexec if cmp -s %D/etc/rc.isc-dhcpd.conf %D/etc/rc.isc-dhcpd.conf.sample; then rm -f %D/etc/rc.isc-dhcpd.conf; fi
etc/rc.isc-dhcpd.conf.sample
@exec [ -f %D/etc/rc.isc-dhcpd.conf ] || cp %D/etc/rc.isc-dhcpd.conf.sample %D/etc/rc.isc-dhcpd.conf
@unexec if cmp -s %D/etc/rc.isc-dhcrelay.conf %D/etc/rc.isc-dhcrelay.conf.sample; then rm -f %D/etc/rc.isc-dhcrelay.conf; fi
etc/rc.isc-dhcrelay.conf.sample
@exec [ -f %D/etc/rc.isc-dhcrelay.conf ] || cp %D/etc/rc.isc-dhcrelay.conf.sample %D/etc/rc.isc-dhcrelay.conf
etc/rc.d/isc-dhcpd.sh.sample
@unexec rm -f etc/rc.d/isc-dhcpd.sh
etc/rc.d/isc-dhcrelay.sh.sample
@unexec rm -f etc/rc.d/isc-dhcrelay.sh
include/dhcpctl.h
include/isc-dhcp/boolean.h
include/isc-dhcp/dst.h
include/isc-dhcp/int.h
include/isc-dhcp/lang.h
include/isc-dhcp/list.h
include/isc-dhcp/result.h
include/isc-dhcp/types.h
include/omapip/alloc.h
include/omapip/buffer.h
include/omapip/omapip.h
lib/libdhcpctl.a
lib/libomapi.a
sbin/dhclient
sbin/dhclient-script
sbin/dhcpd
sbin/dhcrelay
%%PORTDOCS%%%%DOCSDIR%%/ANONCVS
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT

View File

@ -12,11 +12,11 @@ CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3
PKGNAMESUFFIX= 3-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= cyrille.lefevre@laposte.net
COMMENT= ISC Dynamic Host Configuration Protocol client and server code
COMMENT?= The ISC Dynamic Host Configuration Protocol server
USE_REINPLACE= yes
@ -26,16 +26,32 @@ USE_REINPLACE= yes
#
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --subsys ${SUBSYS}
ALL_TARGET= all.${SUBSYS}
INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.if ${SUBSYS} == client
MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server
MAN1= omshell.1
MAN3= dhcpctl.3 omapi.3 omshell.3
MAN5= dhclient.conf.5 dhclient.leases.5 \
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
dhcpd.leases.5
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
MAN5= dhcpd.conf.5 dhcpd.leases.5
MAN8= dhcpd.8
.elif ${SUBSYS} == relay
MAN8= dhcrelay.8
.else
MAN3= dhcpctl.3 omapi.3
.endif
.if ${SUBSYS} != relay
MAN5+= dhcp-eval.5 dhcp-options.5
.endif
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
PKGMESSAGE= ${.CURDIR}/pkg-message
PLIST= ${.CURDIR}/pkg-plist
# Local variables
#
@ -61,14 +77,32 @@ PATCHLEVEL= pl${PORTVERSION:E}
RELEASE= ${PORTVERSION}
.endif
PATCH_SUBDIRS= common minires dst omapip server client relay dhcpctl
PATCH_SUBDIRS= common minires dst omapip
.if ${SUBSYS} == server || ${SUBSYS} == devel
PATCH_SUBDIRS+= dhcpctl
.endif
.if ${SUBSYS} != devel
PATCH_SUBDIRS+= ${SUBSYS}
.endif
.if ${SUBSYS} == server
PATCH_SUBDIRS+= omshell
.endif
BIN_FILES= dhclient dhcpd dhcrelay omshell
.if ${SUBSYS} == client
BIN_FILES= dhclient
CONF_FILES= dhclient.conf
RC_FILES= isc-dhcpd isc-dhcrelay
SAMP_FILES= client/dhclient.conf
DATA_FILES= dhclient.leases
.elif ${SUBSYS} == server
BIN_FILES= dhcpd omshell
RC_FILES= isc-dhcpd
SAMP_FILES= server/dhcpd.conf
DATA_FILES= dhcpd.leases
.elif ${SUBSYS} == relay
BIN_FILES= dhcrelay
RC_FILES= isc-dhcrelay
.endif
DOC_FILES= ANONCVS CHANGES COPYRIGHT README RELNOTES
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
DATA_FILES= dhclient.leases dhcpd.leases
SAMP_SUFX= .sample
@ -79,6 +113,17 @@ DATADIR= /var/db
STRIP_CMD?= strip
# Post-extract
#
post-extract: extract-omshell
extract-omshell:
@${MKDIR} ${WRKSRC}/omshell
@${MV} ${WRKSRC}/dhcpctl/omshell.? ${WRKSRC}/omshell
@${CP} ${FILESDIR}/omshell::Makefile.dist \
${WRKSRC}/omshell/Makefile.dist
# Post-patch
#

View File

@ -0,0 +1,80 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
# http://www.isc.org/isc-license-1.0.html.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
#
CATMANPAGES = omshell.cat1
SEDMANPAGES = omshell.man1
SRCS = omshell.c
OBJS = omshell.o
PROG = omshell
MAN = omshell.1
INCLUDES = -I$(TOP)/dhcpctl $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
DHCPCTLLIBS = ../dhcpctl/libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
all: $(PROG) $(CATMANPAGES)
$(PROG): $(OBJS) $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPCTLLIBS) $(LIBS)
install: all $(CATMANPAGES)
for dir in $(USRMANDIR) $(USERBINDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
fi; \
done; \
done
$(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
$(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
$(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
$(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
-rm -f $(OBJS)
realclean: clean
-rm -f $(PROG) *~ $(CATMANPAGES) $(SEDMANPAGES) #*
distclean: realclean
-rm -f Makefile
links:
@for foo in $(SRCS) $(MAN); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
ln -s $(TOP)/omshell/$$foo $$foo; \
done
omshell.cat1: omshell.man1
nroff -man omshell.man1 >omshell.cat1
omshell.man1: omshell.1
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -0,0 +1,76 @@
--- Makefile.orig Fri Nov 8 00:10:07 2002
+++ Makefile Mon Apr 28 15:04:50 2003
@@ -38,59 +38,59 @@
# ``http://www.nominum.com''.
#
-all:
+all all.devel all.server all.relay all.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make all); \
+ (cd work.$$sysname; make $@); \
fi
-install:
+install install.devel install.server install.relay install.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make install); \
+ (cd work.$$sysname; make $@); \
fi
-depend:
+depend depend.devel depend.server depend.relay depend.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make depend); \
+ (cd work.$$sysname; make $@); \
fi
-clean:
+clean clean.devel clean.server clean.relay clean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make clean); \
+ (cd work.$$sysname; make $@); \
fi
-realclean:
+realclean realclean.devel realclean.server realclean.relay realclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make realclean); \
+ (cd work.$$sysname; make $@); \
fi
-distclean:
+distclean distclean.devel distclean.server distclean.relay distclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make distclean); \
+ (cd work.$$sysname; make $@); \
fi
-links:
+links links.devel links.server links.relay links.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make links); \
+ (cd work.$$sysname; make $@); \
fi

View File

@ -0,0 +1,243 @@
--- Makefile.dist.orig Fri Nov 8 00:10:08 2002
+++ Makefile.dist Tue Apr 29 00:07:43 2003
@@ -3,13 +3,13 @@
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
+# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
-# http://www.isc.org/isc-license-1.0.html.
+# http://www.isc.org/isc-license-1.0.html.
#
-# This file is part of the ISC DHCP distribution. The documentation
+# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
@@ -17,47 +17,200 @@
# http://www.isc.org for more information.
#
-SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
+COMMON_SUBDIRS= common
+DEVEL_SUBDIRS= $(MINIRES) dst omapip dhcpctl
+SERVER_SUBDIRS= omshell server
+RELAY_SUBDIRS= relay
+CLIENT_SUBDIRS= client
+
+DEVEL_BUILD_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_BUILD_SUBDIRS= ${SERVER_SUBDIRS}
+RELAY_BUILD_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_BUILD_SUBDIRS= ${CLIENT_SUBDIRS}
+
+DEVEL_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
+RELAY_INSTALL_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
-all:
- @for dir in ${SUBDIRS}; do \
+all: all.server all.relay all.client
+
+all.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.server: all.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.relay: all.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.client: all.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making all in $$dir"; \
(cd $$dir; $(MAKE) all) || exit 1; \
- done
+ done
+
+install: install.devel install.server install.relay install.client
+
+install.devel:
+ @for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
-install:
- @for dir in ${SUBDIRS}; do \
+install.server:
+ @for dir in ${SERVER_INSTALL_SUBDIRS}; do \
echo "Installing in $$dir"; \
(cd $$dir; $(MAKE) install) || exit 1; \
- done
+ done
-depend:
- @for dir in ${SUBDIRS}; do \
+install.relay:
+ @for dir in ${RELAY_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+install.client:
+ @for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+depend: depend.server depend.relay depend.client
+
+depend.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.server: depend.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.relay: depend.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
echo "Making dependencies in $$dir"; \
(cd $$dir; $(MAKE) depend) || exit 1; \
- done
+ done
+
+depend.client: depend.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+clean: clean.server clean.relay clean.client
+
+clean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.server: clean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.relay: clean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
-clean:
- @for dir in ${SUBDIRS}; do \
+clean.client: clean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Cleaning in $$dir"; \
(cd $$dir; $(MAKE) clean) || exit 1; \
- done
+ done
+
+realclean: realclean.server realclean.relay realclean.client
+
+realclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
-realclean:
- @for dir in ${SUBDIRS}; do \
+realclean.server: realclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
echo "Really cleaning in $$dir"; \
(cd $$dir; $(MAKE) realclean) || exit 1; \
- done
+ done
-distclean:
- @for dir in ${SUBDIRS}; do \
+realclean.relay: realclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+realclean.client: realclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+distclean: distclean.server distclean.relay distclean.client
+
+distclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
echo "Really, really cleaning in $$dir"; \
(cd $$dir; $(MAKE) distclean) || exit 1; \
- done
- @rm -f Makefile
+ done
+
+distclean.server: distclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.relay: distclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.client: distclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+links: links.server links.relay links.client
+
+links.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.server: links.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.relay: links.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
-links:
- @for dir in ${SUBDIRS}; do \
+links.client: links.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making links in $$dir"; \
(cd $$dir; $(MAKE) links) || exit 1; \
- done
+ done

View File

@ -0,0 +1,41 @@
--- configure.orig Sat Apr 20 23:44:13 2002
+++ configure Mon Apr 28 23:02:10 2003
@@ -13,6 +13,9 @@
elif [ x$1 = x--dirs ]; then
dirs=$2
shift
+ elif [ x$1 = x--subsys ]; then
+ subsys=$2
+ shift
elif [ x$1 = x--no-links ]; then
nolinks=YES
elif [ x$1 = x--copts ]; then
@@ -233,7 +236,14 @@
fi
if [ x"$dirs" = x ]; then
- dirs=". client server relay common omapip dhcpctl minires dst"
+ dirs=". common minires dst omapip dhcpctl"
+ if [ x$subsys = x ]; then
+ dirs="$dirs server omshell client relay"
+ elif [ x$subsys = xserver ]; then
+ dirs="$dirs server omshell"
+ elif [ x$subsys = xclient -o x$subsys = xrelay ]; then
+ dirs="$dirs $subsys"
+ fi
fi
for foo in $dirs; do
@@ -253,7 +263,11 @@
# Make the link tree in which to actually build.
if [ x$nolinks = x ]; then
- make links
+ if [ x$subsys = x ]; then
+ make links
+ else
+ make links.$subsys
+ fi
fi
exit 0

View File

@ -0,0 +1,79 @@
--- dhcpctl/Makefile.dist.orig Mon Apr 28 16:31:57 2003
+++ dhcpctl/Makefile.dist Mon Apr 28 16:24:20 2003
@@ -17,11 +17,11 @@
# http://www.isc.org for more information.
#
-CATMANPAGES = dhcpctl.cat3 omshell.cat1
-SEDMANPAGES = dhcpctl.man3 omshell.man1
+CATMANPAGES = dhcpctl.cat3
+SEDMANPAGES = dhcpctl.man3
SRC = dhcpctl.c callback.c remote.c
OBJ = dhcpctl.o callback.o remote.o
-MAN = dhcpctl.3 omshell.1
+MAN = dhcpctl.3
HDRS = dhcpctl.h
INCLUDES = $(BINDINC) -I$(TOP)/includes
@@ -29,10 +29,7 @@
DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
-all: libdhcpctl.a omshell cltest $(CATMANPAGES)
-
-omshell: omshell.o $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
+all: libdhcpctl.a cltest $(CATMANPAGES)
cltest: cltest.o $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
@@ -43,8 +40,7 @@
$(RANLIB) libdhcpctl.a
install: all $(CATMANPAGES)
- for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
- $(USERBINDIR); do \
+ for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
@@ -64,16 +60,12 @@
$(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
done
- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
- -rm -f $(OBJ) test.o svtest cltest.o cltest
+ -rm -f $(OBJ) cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
@@ -82,7 +74,7 @@
-rm -f Makefile
links:
- @for foo in $(SRC) $(MAN) omshell.c cltest.c $(HDRS); do \
+ @for foo in $(SRC) $(MAN) cltest.c $(HDRS); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
@@ -95,12 +87,5 @@
dhcpctl.man3: dhcpctl.3
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
-
-omshell.cat1: omshell.man1
- nroff -man omshell.man1 >omshell.cat1
-
-omshell.man1: omshell.1
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -2,7 +2,7 @@ The ISC Dynamic Host Configuration Protocol Distribution provides a
freely redistributable reference implementation of all aspects of the
DHCP protocol, through a suite of DHCP tools:
* A DHCP server
* A DHCP server (this port)
* A DHCP client
* A DHCP relay agent

View File

@ -1,11 +1,3 @@
**** To setup dhclient, you may need to edit /etc/rc.conf to replace the
base system dhclient, such as :
dhcp_program="%%PREFIX%%/sbin/dhclient"
dhcp_flags="-q"
See dhclient(8), using the following command, for details about other
possible options:
MANPATH=%%MAN1PREFIX%%/man man 8 dhclient
**** To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
to %%PREFIX%%/etc/dhcpd.conf for editing. You also have to rename
%%PREFIX%%/etc/rc.d/isc-dhcpd.sh.sample to %%PREFIX%%/etc/rc.d/isc-\
@ -13,11 +5,3 @@
%%PREFIX%%/etc/rc.isc-dhcpd.conf may be edited to tune some startup
variables such as `dhcpd_options' or `dhcpd_ifaces', both defaulted
to `nothing'. See dhcpd(8) for details about possible options.
**** To setup dhcrelay, you have to rename %%PREFIX%%/etc/rc.d/isc-\
dhcrelay.sh.sample to %%PREFIX%%/etc/rc.d/isc-dhcrelay.sh to
enable automatic startup.
%%PREFIX%%/etc/rc.isc-dhcrelay.conf may need to be edited to setup
the `dhcrelay_servers' as required. If needed, you may also tune
`dhcrelay_options' and `dhcrelay_ifaces', both defaulted to `nothing'.
See dhcrelay(8) for details about possible options.

View File

@ -1,36 +1,12 @@
@comment $FreeBSD$
bin/omshell
etc/dhclient.conf.sample
@exec [ -f %D/etc/dhclient.conf ] || touch %D/etc/dhclient.conf
@unexec [ -L %D/etc/dhclient.conf -o -s %D/etc/dhclient.conf ] || rm -f %D/etc/dhclient.conf
etc/dhcpd.conf.sample
@unexec if cmp -s %D/etc/rc.isc-dhcpd.conf %D/etc/rc.isc-dhcpd.conf.sample; then rm -f %D/etc/rc.isc-dhcpd.conf; fi
etc/rc.isc-dhcpd.conf.sample
@exec [ -f %D/etc/rc.isc-dhcpd.conf ] || cp %D/etc/rc.isc-dhcpd.conf.sample %D/etc/rc.isc-dhcpd.conf
@unexec if cmp -s %D/etc/rc.isc-dhcrelay.conf %D/etc/rc.isc-dhcrelay.conf.sample; then rm -f %D/etc/rc.isc-dhcrelay.conf; fi
etc/rc.isc-dhcrelay.conf.sample
@exec [ -f %D/etc/rc.isc-dhcrelay.conf ] || cp %D/etc/rc.isc-dhcrelay.conf.sample %D/etc/rc.isc-dhcrelay.conf
etc/rc.d/isc-dhcpd.sh.sample
@unexec rm -f etc/rc.d/isc-dhcpd.sh
etc/rc.d/isc-dhcrelay.sh.sample
@unexec rm -f etc/rc.d/isc-dhcrelay.sh
include/dhcpctl.h
include/isc-dhcp/boolean.h
include/isc-dhcp/dst.h
include/isc-dhcp/int.h
include/isc-dhcp/lang.h
include/isc-dhcp/list.h
include/isc-dhcp/result.h
include/isc-dhcp/types.h
include/omapip/alloc.h
include/omapip/buffer.h
include/omapip/omapip.h
lib/libdhcpctl.a
lib/libomapi.a
sbin/dhclient
sbin/dhclient-script
sbin/dhcpd
sbin/dhcrelay
%%PORTDOCS%%%%DOCSDIR%%/ANONCVS
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT

View File

@ -12,11 +12,11 @@ CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3
PKGNAMESUFFIX= 3-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= cyrille.lefevre@laposte.net
COMMENT= ISC Dynamic Host Configuration Protocol client and server code
COMMENT?= The ISC Dynamic Host Configuration Protocol server
USE_REINPLACE= yes
@ -26,16 +26,32 @@ USE_REINPLACE= yes
#
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --subsys ${SUBSYS}
ALL_TARGET= all.${SUBSYS}
INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.if ${SUBSYS} == client
MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server
MAN1= omshell.1
MAN3= dhcpctl.3 omapi.3 omshell.3
MAN5= dhclient.conf.5 dhclient.leases.5 \
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
dhcpd.leases.5
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
MAN5= dhcpd.conf.5 dhcpd.leases.5
MAN8= dhcpd.8
.elif ${SUBSYS} == relay
MAN8= dhcrelay.8
.else
MAN3= dhcpctl.3 omapi.3
.endif
.if ${SUBSYS} != relay
MAN5+= dhcp-eval.5 dhcp-options.5
.endif
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
PKGMESSAGE= ${.CURDIR}/pkg-message
PLIST= ${.CURDIR}/pkg-plist
# Local variables
#
@ -61,14 +77,32 @@ PATCHLEVEL= pl${PORTVERSION:E}
RELEASE= ${PORTVERSION}
.endif
PATCH_SUBDIRS= common minires dst omapip server client relay dhcpctl
PATCH_SUBDIRS= common minires dst omapip
.if ${SUBSYS} == server || ${SUBSYS} == devel
PATCH_SUBDIRS+= dhcpctl
.endif
.if ${SUBSYS} != devel
PATCH_SUBDIRS+= ${SUBSYS}
.endif
.if ${SUBSYS} == server
PATCH_SUBDIRS+= omshell
.endif
BIN_FILES= dhclient dhcpd dhcrelay omshell
.if ${SUBSYS} == client
BIN_FILES= dhclient
CONF_FILES= dhclient.conf
RC_FILES= isc-dhcpd isc-dhcrelay
SAMP_FILES= client/dhclient.conf
DATA_FILES= dhclient.leases
.elif ${SUBSYS} == server
BIN_FILES= dhcpd omshell
RC_FILES= isc-dhcpd
SAMP_FILES= server/dhcpd.conf
DATA_FILES= dhcpd.leases
.elif ${SUBSYS} == relay
BIN_FILES= dhcrelay
RC_FILES= isc-dhcrelay
.endif
DOC_FILES= ANONCVS CHANGES COPYRIGHT README RELNOTES
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
DATA_FILES= dhclient.leases dhcpd.leases
SAMP_SUFX= .sample
@ -79,6 +113,17 @@ DATADIR= /var/db
STRIP_CMD?= strip
# Post-extract
#
post-extract: extract-omshell
extract-omshell:
@${MKDIR} ${WRKSRC}/omshell
@${MV} ${WRKSRC}/dhcpctl/omshell.? ${WRKSRC}/omshell
@${CP} ${FILESDIR}/omshell::Makefile.dist \
${WRKSRC}/omshell/Makefile.dist
# Post-patch
#

View File

@ -0,0 +1,80 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
# http://www.isc.org/isc-license-1.0.html.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
#
CATMANPAGES = omshell.cat1
SEDMANPAGES = omshell.man1
SRCS = omshell.c
OBJS = omshell.o
PROG = omshell
MAN = omshell.1
INCLUDES = -I$(TOP)/dhcpctl $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
DHCPCTLLIBS = ../dhcpctl/libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
all: $(PROG) $(CATMANPAGES)
$(PROG): $(OBJS) $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPCTLLIBS) $(LIBS)
install: all $(CATMANPAGES)
for dir in $(USRMANDIR) $(USERBINDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
fi; \
done; \
done
$(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
$(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
$(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
$(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
-rm -f $(OBJS)
realclean: clean
-rm -f $(PROG) *~ $(CATMANPAGES) $(SEDMANPAGES) #*
distclean: realclean
-rm -f Makefile
links:
@for foo in $(SRCS) $(MAN); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
ln -s $(TOP)/omshell/$$foo $$foo; \
done
omshell.cat1: omshell.man1
nroff -man omshell.man1 >omshell.cat1
omshell.man1: omshell.1
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -0,0 +1,76 @@
--- Makefile.orig Fri Nov 8 00:10:07 2002
+++ Makefile Mon Apr 28 15:04:50 2003
@@ -38,59 +38,59 @@
# ``http://www.nominum.com''.
#
-all:
+all all.devel all.server all.relay all.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make all); \
+ (cd work.$$sysname; make $@); \
fi
-install:
+install install.devel install.server install.relay install.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make install); \
+ (cd work.$$sysname; make $@); \
fi
-depend:
+depend depend.devel depend.server depend.relay depend.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make depend); \
+ (cd work.$$sysname; make $@); \
fi
-clean:
+clean clean.devel clean.server clean.relay clean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make clean); \
+ (cd work.$$sysname; make $@); \
fi
-realclean:
+realclean realclean.devel realclean.server realclean.relay realclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make realclean); \
+ (cd work.$$sysname; make $@); \
fi
-distclean:
+distclean distclean.devel distclean.server distclean.relay distclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make distclean); \
+ (cd work.$$sysname; make $@); \
fi
-links:
+links links.devel links.server links.relay links.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make links); \
+ (cd work.$$sysname; make $@); \
fi

View File

@ -0,0 +1,243 @@
--- Makefile.dist.orig Fri Nov 8 00:10:08 2002
+++ Makefile.dist Tue Apr 29 00:07:43 2003
@@ -3,13 +3,13 @@
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
+# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
-# http://www.isc.org/isc-license-1.0.html.
+# http://www.isc.org/isc-license-1.0.html.
#
-# This file is part of the ISC DHCP distribution. The documentation
+# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
@@ -17,47 +17,200 @@
# http://www.isc.org for more information.
#
-SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
+COMMON_SUBDIRS= common
+DEVEL_SUBDIRS= $(MINIRES) dst omapip dhcpctl
+SERVER_SUBDIRS= omshell server
+RELAY_SUBDIRS= relay
+CLIENT_SUBDIRS= client
+
+DEVEL_BUILD_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_BUILD_SUBDIRS= ${SERVER_SUBDIRS}
+RELAY_BUILD_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_BUILD_SUBDIRS= ${CLIENT_SUBDIRS}
+
+DEVEL_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
+RELAY_INSTALL_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
-all:
- @for dir in ${SUBDIRS}; do \
+all: all.server all.relay all.client
+
+all.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.server: all.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.relay: all.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.client: all.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making all in $$dir"; \
(cd $$dir; $(MAKE) all) || exit 1; \
- done
+ done
+
+install: install.devel install.server install.relay install.client
+
+install.devel:
+ @for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
-install:
- @for dir in ${SUBDIRS}; do \
+install.server:
+ @for dir in ${SERVER_INSTALL_SUBDIRS}; do \
echo "Installing in $$dir"; \
(cd $$dir; $(MAKE) install) || exit 1; \
- done
+ done
-depend:
- @for dir in ${SUBDIRS}; do \
+install.relay:
+ @for dir in ${RELAY_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+install.client:
+ @for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+depend: depend.server depend.relay depend.client
+
+depend.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.server: depend.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.relay: depend.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
echo "Making dependencies in $$dir"; \
(cd $$dir; $(MAKE) depend) || exit 1; \
- done
+ done
+
+depend.client: depend.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+clean: clean.server clean.relay clean.client
+
+clean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.server: clean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.relay: clean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
-clean:
- @for dir in ${SUBDIRS}; do \
+clean.client: clean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Cleaning in $$dir"; \
(cd $$dir; $(MAKE) clean) || exit 1; \
- done
+ done
+
+realclean: realclean.server realclean.relay realclean.client
+
+realclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
-realclean:
- @for dir in ${SUBDIRS}; do \
+realclean.server: realclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
echo "Really cleaning in $$dir"; \
(cd $$dir; $(MAKE) realclean) || exit 1; \
- done
+ done
-distclean:
- @for dir in ${SUBDIRS}; do \
+realclean.relay: realclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+realclean.client: realclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+distclean: distclean.server distclean.relay distclean.client
+
+distclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
echo "Really, really cleaning in $$dir"; \
(cd $$dir; $(MAKE) distclean) || exit 1; \
- done
- @rm -f Makefile
+ done
+
+distclean.server: distclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.relay: distclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.client: distclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+links: links.server links.relay links.client
+
+links.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.server: links.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.relay: links.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
-links:
- @for dir in ${SUBDIRS}; do \
+links.client: links.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making links in $$dir"; \
(cd $$dir; $(MAKE) links) || exit 1; \
- done
+ done

View File

@ -0,0 +1,41 @@
--- configure.orig Sat Apr 20 23:44:13 2002
+++ configure Mon Apr 28 23:02:10 2003
@@ -13,6 +13,9 @@
elif [ x$1 = x--dirs ]; then
dirs=$2
shift
+ elif [ x$1 = x--subsys ]; then
+ subsys=$2
+ shift
elif [ x$1 = x--no-links ]; then
nolinks=YES
elif [ x$1 = x--copts ]; then
@@ -233,7 +236,14 @@
fi
if [ x"$dirs" = x ]; then
- dirs=". client server relay common omapip dhcpctl minires dst"
+ dirs=". common minires dst omapip dhcpctl"
+ if [ x$subsys = x ]; then
+ dirs="$dirs server omshell client relay"
+ elif [ x$subsys = xserver ]; then
+ dirs="$dirs server omshell"
+ elif [ x$subsys = xclient -o x$subsys = xrelay ]; then
+ dirs="$dirs $subsys"
+ fi
fi
for foo in $dirs; do
@@ -253,7 +263,11 @@
# Make the link tree in which to actually build.
if [ x$nolinks = x ]; then
- make links
+ if [ x$subsys = x ]; then
+ make links
+ else
+ make links.$subsys
+ fi
fi
exit 0

View File

@ -0,0 +1,79 @@
--- dhcpctl/Makefile.dist.orig Mon Apr 28 16:31:57 2003
+++ dhcpctl/Makefile.dist Mon Apr 28 16:24:20 2003
@@ -17,11 +17,11 @@
# http://www.isc.org for more information.
#
-CATMANPAGES = dhcpctl.cat3 omshell.cat1
-SEDMANPAGES = dhcpctl.man3 omshell.man1
+CATMANPAGES = dhcpctl.cat3
+SEDMANPAGES = dhcpctl.man3
SRC = dhcpctl.c callback.c remote.c
OBJ = dhcpctl.o callback.o remote.o
-MAN = dhcpctl.3 omshell.1
+MAN = dhcpctl.3
HDRS = dhcpctl.h
INCLUDES = $(BINDINC) -I$(TOP)/includes
@@ -29,10 +29,7 @@
DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
-all: libdhcpctl.a omshell cltest $(CATMANPAGES)
-
-omshell: omshell.o $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
+all: libdhcpctl.a cltest $(CATMANPAGES)
cltest: cltest.o $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
@@ -43,8 +40,7 @@
$(RANLIB) libdhcpctl.a
install: all $(CATMANPAGES)
- for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
- $(USERBINDIR); do \
+ for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
@@ -64,16 +60,12 @@
$(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
done
- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
- -rm -f $(OBJ) test.o svtest cltest.o cltest
+ -rm -f $(OBJ) cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
@@ -82,7 +74,7 @@
-rm -f Makefile
links:
- @for foo in $(SRC) $(MAN) omshell.c cltest.c $(HDRS); do \
+ @for foo in $(SRC) $(MAN) cltest.c $(HDRS); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
@@ -95,12 +87,5 @@
dhcpctl.man3: dhcpctl.3
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
-
-omshell.cat1: omshell.man1
- nroff -man omshell.man1 >omshell.cat1
-
-omshell.man1: omshell.1
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -2,7 +2,7 @@ The ISC Dynamic Host Configuration Protocol Distribution provides a
freely redistributable reference implementation of all aspects of the
DHCP protocol, through a suite of DHCP tools:
* A DHCP server
* A DHCP server (this port)
* A DHCP client
* A DHCP relay agent

View File

@ -1,11 +1,3 @@
**** To setup dhclient, you may need to edit /etc/rc.conf to replace the
base system dhclient, such as :
dhcp_program="%%PREFIX%%/sbin/dhclient"
dhcp_flags="-q"
See dhclient(8), using the following command, for details about other
possible options:
MANPATH=%%MAN1PREFIX%%/man man 8 dhclient
**** To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
to %%PREFIX%%/etc/dhcpd.conf for editing. You also have to rename
%%PREFIX%%/etc/rc.d/isc-dhcpd.sh.sample to %%PREFIX%%/etc/rc.d/isc-\
@ -13,11 +5,3 @@
%%PREFIX%%/etc/rc.isc-dhcpd.conf may be edited to tune some startup
variables such as `dhcpd_options' or `dhcpd_ifaces', both defaulted
to `nothing'. See dhcpd(8) for details about possible options.
**** To setup dhcrelay, you have to rename %%PREFIX%%/etc/rc.d/isc-\
dhcrelay.sh.sample to %%PREFIX%%/etc/rc.d/isc-dhcrelay.sh to
enable automatic startup.
%%PREFIX%%/etc/rc.isc-dhcrelay.conf may need to be edited to setup
the `dhcrelay_servers' as required. If needed, you may also tune
`dhcrelay_options' and `dhcrelay_ifaces', both defaulted to `nothing'.
See dhcrelay(8) for details about possible options.

View File

@ -1,36 +1,12 @@
@comment $FreeBSD$
bin/omshell
etc/dhclient.conf.sample
@exec [ -f %D/etc/dhclient.conf ] || touch %D/etc/dhclient.conf
@unexec [ -L %D/etc/dhclient.conf -o -s %D/etc/dhclient.conf ] || rm -f %D/etc/dhclient.conf
etc/dhcpd.conf.sample
@unexec if cmp -s %D/etc/rc.isc-dhcpd.conf %D/etc/rc.isc-dhcpd.conf.sample; then rm -f %D/etc/rc.isc-dhcpd.conf; fi
etc/rc.isc-dhcpd.conf.sample
@exec [ -f %D/etc/rc.isc-dhcpd.conf ] || cp %D/etc/rc.isc-dhcpd.conf.sample %D/etc/rc.isc-dhcpd.conf
@unexec if cmp -s %D/etc/rc.isc-dhcrelay.conf %D/etc/rc.isc-dhcrelay.conf.sample; then rm -f %D/etc/rc.isc-dhcrelay.conf; fi
etc/rc.isc-dhcrelay.conf.sample
@exec [ -f %D/etc/rc.isc-dhcrelay.conf ] || cp %D/etc/rc.isc-dhcrelay.conf.sample %D/etc/rc.isc-dhcrelay.conf
etc/rc.d/isc-dhcpd.sh.sample
@unexec rm -f etc/rc.d/isc-dhcpd.sh
etc/rc.d/isc-dhcrelay.sh.sample
@unexec rm -f etc/rc.d/isc-dhcrelay.sh
include/dhcpctl.h
include/isc-dhcp/boolean.h
include/isc-dhcp/dst.h
include/isc-dhcp/int.h
include/isc-dhcp/lang.h
include/isc-dhcp/list.h
include/isc-dhcp/result.h
include/isc-dhcp/types.h
include/omapip/alloc.h
include/omapip/buffer.h
include/omapip/omapip.h
lib/libdhcpctl.a
lib/libomapi.a
sbin/dhclient
sbin/dhclient-script
sbin/dhcpd
sbin/dhcrelay
%%PORTDOCS%%%%DOCSDIR%%/ANONCVS
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT

View File

@ -12,11 +12,11 @@ CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3
PKGNAMESUFFIX= 3-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= cyrille.lefevre@laposte.net
COMMENT= ISC Dynamic Host Configuration Protocol client and server code
COMMENT?= The ISC Dynamic Host Configuration Protocol server
USE_REINPLACE= yes
@ -26,16 +26,32 @@ USE_REINPLACE= yes
#
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --subsys ${SUBSYS}
ALL_TARGET= all.${SUBSYS}
INSTALL_TARGET= install.${SUBSYS}
SUBSYS?= server
.if ${SUBSYS} == client
MAN5= dhclient.conf.5 dhclient.leases.5
MAN8= dhclient.8 dhclient-script.8
.elif ${SUBSYS} == server
MAN1= omshell.1
MAN3= dhcpctl.3 omapi.3 omshell.3
MAN5= dhclient.conf.5 dhclient.leases.5 \
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
dhcpd.leases.5
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
MAN5= dhcpd.conf.5 dhcpd.leases.5
MAN8= dhcpd.8
.elif ${SUBSYS} == relay
MAN8= dhcrelay.8
.else
MAN3= dhcpctl.3 omapi.3
.endif
.if ${SUBSYS} != relay
MAN5+= dhcp-eval.5 dhcp-options.5
.endif
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
MSG_FILE= ${.CURDIR}/pkg-message
PKGMESSAGE= ${.CURDIR}/pkg-message
PLIST= ${.CURDIR}/pkg-plist
# Local variables
#
@ -61,14 +77,32 @@ PATCHLEVEL= pl${PORTVERSION:E}
RELEASE= ${PORTVERSION}
.endif
PATCH_SUBDIRS= common minires dst omapip server client relay dhcpctl
PATCH_SUBDIRS= common minires dst omapip
.if ${SUBSYS} == server || ${SUBSYS} == devel
PATCH_SUBDIRS+= dhcpctl
.endif
.if ${SUBSYS} != devel
PATCH_SUBDIRS+= ${SUBSYS}
.endif
.if ${SUBSYS} == server
PATCH_SUBDIRS+= omshell
.endif
BIN_FILES= dhclient dhcpd dhcrelay omshell
.if ${SUBSYS} == client
BIN_FILES= dhclient
CONF_FILES= dhclient.conf
RC_FILES= isc-dhcpd isc-dhcrelay
SAMP_FILES= client/dhclient.conf
DATA_FILES= dhclient.leases
.elif ${SUBSYS} == server
BIN_FILES= dhcpd omshell
RC_FILES= isc-dhcpd
SAMP_FILES= server/dhcpd.conf
DATA_FILES= dhcpd.leases
.elif ${SUBSYS} == relay
BIN_FILES= dhcrelay
RC_FILES= isc-dhcrelay
.endif
DOC_FILES= ANONCVS CHANGES COPYRIGHT README RELNOTES
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
DATA_FILES= dhclient.leases dhcpd.leases
SAMP_SUFX= .sample
@ -79,6 +113,17 @@ DATADIR= /var/db
STRIP_CMD?= strip
# Post-extract
#
post-extract: extract-omshell
extract-omshell:
@${MKDIR} ${WRKSRC}/omshell
@${MV} ${WRKSRC}/dhcpctl/omshell.? ${WRKSRC}/omshell
@${CP} ${FILESDIR}/omshell::Makefile.dist \
${WRKSRC}/omshell/Makefile.dist
# Post-patch
#

View File

@ -0,0 +1,80 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
# http://www.isc.org/isc-license-1.0.html.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
#
CATMANPAGES = omshell.cat1
SEDMANPAGES = omshell.man1
SRCS = omshell.c
OBJS = omshell.o
PROG = omshell
MAN = omshell.1
INCLUDES = -I$(TOP)/dhcpctl $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
DHCPCTLLIBS = ../dhcpctl/libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
all: $(PROG) $(CATMANPAGES)
$(PROG): $(OBJS) $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPCTLLIBS) $(LIBS)
install: all $(CATMANPAGES)
for dir in $(USRMANDIR) $(USERBINDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
fi; \
done; \
done
$(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
$(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
$(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
$(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
-rm -f $(OBJS)
realclean: clean
-rm -f $(PROG) *~ $(CATMANPAGES) $(SEDMANPAGES) #*
distclean: realclean
-rm -f Makefile
links:
@for foo in $(SRCS) $(MAN); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
ln -s $(TOP)/omshell/$$foo $$foo; \
done
omshell.cat1: omshell.man1
nroff -man omshell.man1 >omshell.cat1
omshell.man1: omshell.1
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -0,0 +1,76 @@
--- Makefile.orig Fri Nov 8 00:10:07 2002
+++ Makefile Mon Apr 28 15:04:50 2003
@@ -38,59 +38,59 @@
# ``http://www.nominum.com''.
#
-all:
+all all.devel all.server all.relay all.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make all); \
+ (cd work.$$sysname; make $@); \
fi
-install:
+install install.devel install.server install.relay install.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make install); \
+ (cd work.$$sysname; make $@); \
fi
-depend:
+depend depend.devel depend.server depend.relay depend.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make depend); \
+ (cd work.$$sysname; make $@); \
fi
-clean:
+clean clean.devel clean.server clean.relay clean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make clean); \
+ (cd work.$$sysname; make $@); \
fi
-realclean:
+realclean realclean.devel realclean.server realclean.relay realclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make realclean); \
+ (cd work.$$sysname; make $@); \
fi
-distclean:
+distclean distclean.devel distclean.server distclean.relay distclean.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make distclean); \
+ (cd work.$$sysname; make $@); \
fi
-links:
+links links.devel links.server links.relay links.client:
@sysname=`./configure --print-sysname`; \
if [ ! -d work.$$sysname ]; then \
echo No build directory for $$sysname - please run ./configure.; \
else \
- (cd work.$$sysname; make links); \
+ (cd work.$$sysname; make $@); \
fi

View File

@ -0,0 +1,243 @@
--- Makefile.dist.orig Fri Nov 8 00:10:08 2002
+++ Makefile.dist Tue Apr 29 00:07:43 2003
@@ -3,13 +3,13 @@
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
+# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
#
-# http://www.isc.org/isc-license-1.0.html.
+# http://www.isc.org/isc-license-1.0.html.
#
-# This file is part of the ISC DHCP distribution. The documentation
+# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
@@ -17,47 +17,200 @@
# http://www.isc.org for more information.
#
-SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
+COMMON_SUBDIRS= common
+DEVEL_SUBDIRS= $(MINIRES) dst omapip dhcpctl
+SERVER_SUBDIRS= omshell server
+RELAY_SUBDIRS= relay
+CLIENT_SUBDIRS= client
+
+DEVEL_BUILD_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_BUILD_SUBDIRS= ${SERVER_SUBDIRS}
+RELAY_BUILD_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_BUILD_SUBDIRS= ${CLIENT_SUBDIRS}
+
+DEVEL_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
+RELAY_INSTALL_SUBDIRS= ${RELAY_SUBDIRS}
+CLIENT_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
-all:
- @for dir in ${SUBDIRS}; do \
+all: all.server all.relay all.client
+
+all.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.server: all.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.relay: all.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making all in $$dir"; \
+ (cd $$dir; $(MAKE) all) || exit 1; \
+ done
+
+all.client: all.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making all in $$dir"; \
(cd $$dir; $(MAKE) all) || exit 1; \
- done
+ done
+
+install: install.devel install.server install.relay install.client
+
+install.devel:
+ @for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
-install:
- @for dir in ${SUBDIRS}; do \
+install.server:
+ @for dir in ${SERVER_INSTALL_SUBDIRS}; do \
echo "Installing in $$dir"; \
(cd $$dir; $(MAKE) install) || exit 1; \
- done
+ done
-depend:
- @for dir in ${SUBDIRS}; do \
+install.relay:
+ @for dir in ${RELAY_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+install.client:
+ @for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
+ echo "Installing in $$dir"; \
+ (cd $$dir; $(MAKE) install) || exit 1; \
+ done
+
+depend: depend.server depend.relay depend.client
+
+depend.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.server: depend.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+depend.relay: depend.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
echo "Making dependencies in $$dir"; \
(cd $$dir; $(MAKE) depend) || exit 1; \
- done
+ done
+
+depend.client: depend.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Making dependencies in $$dir"; \
+ (cd $$dir; $(MAKE) depend) || exit 1; \
+ done
+
+clean: clean.server clean.relay clean.client
+
+clean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.server: clean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
+
+clean.relay: clean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) clean) || exit 1; \
+ done
-clean:
- @for dir in ${SUBDIRS}; do \
+clean.client: clean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Cleaning in $$dir"; \
(cd $$dir; $(MAKE) clean) || exit 1; \
- done
+ done
+
+realclean: realclean.server realclean.relay realclean.client
+
+realclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
-realclean:
- @for dir in ${SUBDIRS}; do \
+realclean.server: realclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
echo "Really cleaning in $$dir"; \
(cd $$dir; $(MAKE) realclean) || exit 1; \
- done
+ done
-distclean:
- @for dir in ${SUBDIRS}; do \
+realclean.relay: realclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+realclean.client: realclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) realclean) || exit 1; \
+ done
+
+distclean: distclean.server distclean.relay distclean.client
+
+distclean.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
echo "Really, really cleaning in $$dir"; \
(cd $$dir; $(MAKE) distclean) || exit 1; \
- done
- @rm -f Makefile
+ done
+
+distclean.server: distclean.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.relay: distclean.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+distclean.client: distclean.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+ echo "Really, really cleaning in $$dir"; \
+ (cd $$dir; $(MAKE) distclean) || exit 1; \
+ done
+
+links: links.server links.relay links.client
+
+links.devel:
+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.server: links.devel
+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
+
+links.relay: links.devel
+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
+ echo "Making links in $$dir"; \
+ (cd $$dir; $(MAKE) links) || exit 1; \
+ done
-links:
- @for dir in ${SUBDIRS}; do \
+links.client: links.devel
+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
echo "Making links in $$dir"; \
(cd $$dir; $(MAKE) links) || exit 1; \
- done
+ done

View File

@ -0,0 +1,41 @@
--- configure.orig Sat Apr 20 23:44:13 2002
+++ configure Mon Apr 28 23:02:10 2003
@@ -13,6 +13,9 @@
elif [ x$1 = x--dirs ]; then
dirs=$2
shift
+ elif [ x$1 = x--subsys ]; then
+ subsys=$2
+ shift
elif [ x$1 = x--no-links ]; then
nolinks=YES
elif [ x$1 = x--copts ]; then
@@ -233,7 +236,14 @@
fi
if [ x"$dirs" = x ]; then
- dirs=". client server relay common omapip dhcpctl minires dst"
+ dirs=". common minires dst omapip dhcpctl"
+ if [ x$subsys = x ]; then
+ dirs="$dirs server omshell client relay"
+ elif [ x$subsys = xserver ]; then
+ dirs="$dirs server omshell"
+ elif [ x$subsys = xclient -o x$subsys = xrelay ]; then
+ dirs="$dirs $subsys"
+ fi
fi
for foo in $dirs; do
@@ -253,7 +263,11 @@
# Make the link tree in which to actually build.
if [ x$nolinks = x ]; then
- make links
+ if [ x$subsys = x ]; then
+ make links
+ else
+ make links.$subsys
+ fi
fi
exit 0

View File

@ -0,0 +1,79 @@
--- dhcpctl/Makefile.dist.orig Mon Apr 28 16:31:57 2003
+++ dhcpctl/Makefile.dist Mon Apr 28 16:24:20 2003
@@ -17,11 +17,11 @@
# http://www.isc.org for more information.
#
-CATMANPAGES = dhcpctl.cat3 omshell.cat1
-SEDMANPAGES = dhcpctl.man3 omshell.man1
+CATMANPAGES = dhcpctl.cat3
+SEDMANPAGES = dhcpctl.man3
SRC = dhcpctl.c callback.c remote.c
OBJ = dhcpctl.o callback.o remote.o
-MAN = dhcpctl.3 omshell.1
+MAN = dhcpctl.3
HDRS = dhcpctl.h
INCLUDES = $(BINDINC) -I$(TOP)/includes
@@ -29,10 +29,7 @@
DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
../omapip/libomapi.a ../dst/libdst.a
-all: libdhcpctl.a omshell cltest $(CATMANPAGES)
-
-omshell: omshell.o $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
+all: libdhcpctl.a cltest $(CATMANPAGES)
cltest: cltest.o $(DHCPCTLLIBS)
$(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
@@ -43,8 +40,7 @@
$(RANLIB) libdhcpctl.a
install: all $(CATMANPAGES)
- for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
- $(USERBINDIR); do \
+ for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR); do \
foo=""; \
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
@@ -64,16 +60,12 @@
$(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
done
- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
- -rm -f $(OBJ) test.o svtest cltest.o cltest
+ -rm -f $(OBJ) cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
@@ -82,7 +74,7 @@
-rm -f Makefile
links:
- @for foo in $(SRC) $(MAN) omshell.c cltest.c $(HDRS); do \
+ @for foo in $(SRC) $(MAN) cltest.c $(HDRS); do \
if [ ! -b $$foo ]; then \
rm -f $$foo; \
fi; \
@@ -95,12 +87,5 @@
dhcpctl.man3: dhcpctl.3
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
-
-omshell.cat1: omshell.man1
- nroff -man omshell.man1 >omshell.cat1
-
-omshell.man1: omshell.1
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
# Dependencies (semi-automatically-generated)

View File

@ -2,7 +2,7 @@ The ISC Dynamic Host Configuration Protocol Distribution provides a
freely redistributable reference implementation of all aspects of the
DHCP protocol, through a suite of DHCP tools:
* A DHCP server
* A DHCP server (this port)
* A DHCP client
* A DHCP relay agent

View File

@ -1,11 +1,3 @@
**** To setup dhclient, you may need to edit /etc/rc.conf to replace the
base system dhclient, such as :
dhcp_program="%%PREFIX%%/sbin/dhclient"
dhcp_flags="-q"
See dhclient(8), using the following command, for details about other
possible options:
MANPATH=%%MAN1PREFIX%%/man man 8 dhclient
**** To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
to %%PREFIX%%/etc/dhcpd.conf for editing. You also have to rename
%%PREFIX%%/etc/rc.d/isc-dhcpd.sh.sample to %%PREFIX%%/etc/rc.d/isc-\
@ -13,11 +5,3 @@
%%PREFIX%%/etc/rc.isc-dhcpd.conf may be edited to tune some startup
variables such as `dhcpd_options' or `dhcpd_ifaces', both defaulted
to `nothing'. See dhcpd(8) for details about possible options.
**** To setup dhcrelay, you have to rename %%PREFIX%%/etc/rc.d/isc-\
dhcrelay.sh.sample to %%PREFIX%%/etc/rc.d/isc-dhcrelay.sh to
enable automatic startup.
%%PREFIX%%/etc/rc.isc-dhcrelay.conf may need to be edited to setup
the `dhcrelay_servers' as required. If needed, you may also tune
`dhcrelay_options' and `dhcrelay_ifaces', both defaulted to `nothing'.
See dhcrelay(8) for details about possible options.

View File

@ -1,36 +1,12 @@
@comment $FreeBSD$
bin/omshell
etc/dhclient.conf.sample
@exec [ -f %D/etc/dhclient.conf ] || touch %D/etc/dhclient.conf
@unexec [ -L %D/etc/dhclient.conf -o -s %D/etc/dhclient.conf ] || rm -f %D/etc/dhclient.conf
etc/dhcpd.conf.sample
@unexec if cmp -s %D/etc/rc.isc-dhcpd.conf %D/etc/rc.isc-dhcpd.conf.sample; then rm -f %D/etc/rc.isc-dhcpd.conf; fi
etc/rc.isc-dhcpd.conf.sample
@exec [ -f %D/etc/rc.isc-dhcpd.conf ] || cp %D/etc/rc.isc-dhcpd.conf.sample %D/etc/rc.isc-dhcpd.conf
@unexec if cmp -s %D/etc/rc.isc-dhcrelay.conf %D/etc/rc.isc-dhcrelay.conf.sample; then rm -f %D/etc/rc.isc-dhcrelay.conf; fi
etc/rc.isc-dhcrelay.conf.sample
@exec [ -f %D/etc/rc.isc-dhcrelay.conf ] || cp %D/etc/rc.isc-dhcrelay.conf.sample %D/etc/rc.isc-dhcrelay.conf
etc/rc.d/isc-dhcpd.sh.sample
@unexec rm -f etc/rc.d/isc-dhcpd.sh
etc/rc.d/isc-dhcrelay.sh.sample
@unexec rm -f etc/rc.d/isc-dhcrelay.sh
include/dhcpctl.h
include/isc-dhcp/boolean.h
include/isc-dhcp/dst.h
include/isc-dhcp/int.h
include/isc-dhcp/lang.h
include/isc-dhcp/list.h
include/isc-dhcp/result.h
include/isc-dhcp/types.h
include/omapip/alloc.h
include/omapip/buffer.h
include/omapip/omapip.h
lib/libdhcpctl.a
lib/libomapi.a
sbin/dhclient
sbin/dhclient-script
sbin/dhcpd
sbin/dhcrelay
%%PORTDOCS%%%%DOCSDIR%%/ANONCVS
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT