freebsd-ports/net/isc-dhcp3-server/Makefile
Dag-Erling Smørgrav b77059fee2 Mega-update from maintainer:
isc-dhcp3-client/pkg-message
 	updated

 isc-dhcp3-devel/pkg-plist
 	updated from PR#61620

 isc-dhcp3-relay/pkg-message
 	rewritten to reflect rcNG change
 isc-dhcp3-relay/pkg-plist
 	etc/rc.isc-dhcrelay.conf deleted
 	etc/rc.d/isc-dhcrelay.sh.sample renamed to etc/rc.d/isc-dhcrelay.sh

 isc-dhcp3-server/Makefile
 	PORTREVISION bumped
 	USE_RC_SUBR added
 	*_SUB added
 	pre-everything added (WITHOUT_INTERFACE_POLLING cond added)
 	patch-scripts and patch-pkgmessage (! -devel cond) updated
 	patch-site-conf and patch-rc-scripts added
 	install-startup-files now install etc/rc.d/isc-dhcpd.sh
 	 instead of etc/rc.d/isc-dhcpd.sh.sample
 	display-message updated (! -devel cond)
 isc-dhcp3-server/pkg-message
 	rewritten to reflect rcNG change
 isc-dhcp3-server/pkg-plist
 	etc/rc.isc-dhcpd.conf deleted
 	etc/rc.d/isc-dhcpd.sh.sample renamed to etc/rc.d/isc-dhcpd.sh
 isc-dhcp3-server/files/isc-dhcpd.sh.sample
 isc-dhcp3-server/files/isc-dhcrelay.sh.sample
 	both converted to rcNG
 isc-dhcp3-server/files/patch-freebsd
 	synced w/ -current
 isc-dhcp3-server/files/patch-site.conf
 	CLIENT_PATH added
 	CFLAGS synced w/ -current
 isc-dhcp3-server/patch-client::clparse.c
 isc-dhcp3-server/patch-client::dhclient.8
 	new files synced w/ -current
 isc-dhcp3-server/patch-client::dhclient.c
 	new file synced w/ -current (-DENABLE_POLLING_MODE)
 isc-dhcp3-server/patch-client::dhclient.conf
 	new file
 isc-dhcp3-server/patch-common::dhcp-options.5
 	new file synced w/ -current
 isc-dhcp3-server/patch-common::discover.c
 	new file from PR#61011
 isc-dhcp3-server/patch-common::dispatch.c
 	new file synced w/ -current (-DENABLE_POLLING_MODE)
 isc-dhcp3-server/files/patch-common::parse.c
	fix time_t issues on little-endian 64-bit platforms
 isc-dhcp3-server/patch-dst::Makefile.dist
 	new file from PR#61620
 isc-dhcp3-server/patch-includes::cf::freebsd.h
 	new file synced w/ -current (-DRESCUE unused right now)
 isc-dhcp3-server/patch-includes::dhcpd.h
 	new file synced w/ -current (-DENABLE_POLLING_MODE)
 isc-dhcp3-server/files/rc.isc-dhcpd.conf.sample
 isc-dhcp3-server/files/rc.isc-dhcrelay.conf.sample
 	deleted files

PR:		57943, 61011, 61620
Submitted by:	sec@42.org, andy@fud.org.nz, kaa@in-line.ru, des, ru
2004-03-16 20:31:15 +00:00

243 lines
5.4 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: dhcp
# Date created: 7 Mar 1996
# Whom: se
#
# $FreeBSD$
#
PORTNAME= dhcp
PORTVERSION= 3.0.1.r12
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= cyrille.lefevre@laposte.net
COMMENT?= The ISC Dynamic Host Configuration Protocol server
USE_REINPLACE= yes
USE_RC_SUBR= yes
.include <bsd.port.pre.mk>
# Global variables
#
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
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= ${.CURDIR}/pkg-message
DESCR= ${.CURDIR}/pkg-descr
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST= ${.CURDIR}/pkg-plist
# Local variables
#
# for instance, possible versions are:
# 1.2.r3.4 (or 1.2.b3.4), 1.2.r3 (or 1.2.b3), 1.2.3, 1.2
# which have to become:
# 1.2rc3pl4 (or 1.2beta3pl4), 1.2rc3 (or 1.2beta3), 1.2pl3, 1.2
# so, the magic things are:
VERSION=
PATCHLEVEL=
.if ${PORTVERSION:R:E:M[br]*} != ""
RELEASE= ${PORTVERSION:R:R}
VERSION= ${PORTVERSION:R:E:S/b/beta/:S/r/rc/}
PATCHLEVEL= pl${PORTVERSION:E}
.elif ${PORTVERSION:E:M[br]*} != ""
RELEASE= ${PORTVERSION:R}
VERSION= ${PORTVERSION:E:S/b/beta/:S/r/rc/}
.elif ${PORTVERSION:R:E} != ""
RELEASE= ${PORTVERSION:R}
PATCHLEVEL= pl${PORTVERSION:E}
.else
RELEASE= ${PORTVERSION}
.endif
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
.if ${SUBSYS} == client
BIN_FILES= dhclient
CONF_FILES= dhclient.conf
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_SUFX= .sample
CONF_DIR= ${PREFIX}/etc
RC_DIR= ${PREFIX}/etc/rc.d
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
DATADIR= /var/db
REINPLACE_SUB= PREFIX=${PREFIX}
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
PKGMESSAGE_SUB= PREFIX=${PREFIX} MAN1PREFIX=${MAN1PREFIX}
# Pre-everything
#
.if ${SUBSYS} == client && !defined(WITHOUT_INTERFACE_POLLING)
pre-everything::
@${ECHO_MSG}
@${ECHO_MSG} "If you want to compile without interface polling support."
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITHOUT_INTERFACE_POLLING=yes\""
@${ECHO_MSG}
.endif
# 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
#
post-patch: patch-scripts patch-makefile-conf \
patch-makefiles-dist patch-man-pages \
patch-pkgmessage patch-site-conf \
patch-rc-scripts
patch-scripts:
@${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/client/dhclient.conf \
${WRKSRC}/client/scripts/freebsd
patch-site-conf:
.if ${SUBSYS} == client && !defined(WITHOUT_INTERFACE_POLLING)
@${ECHO_CMD} CFLAGS += -DENABLE_POLLING_MODE >> ${WRKSRC}/site.conf
.endif
patch-makefile-conf:
@${REINPLACE_CMD} -e 's|^DEBUG[ ]*=|# DEBUG ?=|g' \
${WRKSRC}/Makefile.conf
patch-makefiles-dist:
.for subdir in ${PATCH_SUBDIRS}
@${REINPLACE_CMD} -e 's|^CFLAGS[ ]*=|CFLAGS +=|g' \
${WRKSRC}/${subdir}/Makefile.dist
.endfor
# temporary hack - no patch file needed for this typo.
patch-man-pages:
@${REINPLACE_CMD} -e '/^\.Fd$$/d' ${WRKSRC}/dhcpctl/dhcpctl.3
patch-rc-scripts:
.for f in ${RC_FILES}
@${SED} ${RCSCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/${f}.sh${SAMP_SUFX} > ${WRKDIR}/${f}.sh
.endfor
patch-pkgmessage:
.if ${SUBSYS} != devel
@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${MSG_FILE} > ${PKGMESSAGE}
.endif
# Post-install
#
post-install: strip-binary-files install-startup-files \
install-doc-files install-sample-files \
create-conf-files create-data-files \
display-message
strip-binary-files:
.for f in ${BIN_FILES}
.if exists(${PREFIX}/bin/${f})
@${STRIP_CMD} ${PREFIX}/bin/${f}
.endif
.if exists(${PREFIX}/sbin/${f})
@${STRIP_CMD} ${PREFIX}/sbin/${f}
.endif
.endfor
install-startup-files:
.for f in ${RC_FILES}
@${INSTALL_SCRIPT} ${WRKDIR}/${f}.sh ${RC_DIR}
.endfor
install-doc-files:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for f in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
install-sample-files:
.for f in ${SAMP_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${CONF_DIR}/${f:T}${SAMP_SUFX}
.endfor
create-conf-files:
.for f in ${CONF_FILES}
.if !exists(${CONF_DIR}/${f})
@${TOUCH} ${CONF_DIR}/${f}
.endif
.endfor
create-data-files:
.for f in ${DATA_FILES}
.if !exists(${DATADIR}/${f})
@${TOUCH} ${DATADIR}/${f}
.endif
.endfor
display-message:
.if ${SUBSYS} != devel
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.endif
.include <bsd.port.post.mk>