2000-06-14 12:21:21 -04:00
|
|
|
# ex:ts=8
|
1996-03-08 06:45:10 -05:00
|
|
|
# Ports collection makefile for: dhcp
|
|
|
|
# Date created: 7 Mar 1996
|
|
|
|
# Whom: se
|
|
|
|
#
|
1999-08-30 10:24:37 -04:00
|
|
|
# $FreeBSD$
|
1996-03-08 06:45:10 -05:00
|
|
|
#
|
|
|
|
|
2001-03-09 10:10:15 -05:00
|
|
|
PORTNAME= dhcp
|
2003-09-10 10:22:30 -04:00
|
|
|
PORTVERSION= 3.0.1.r12
|
1996-11-18 06:44:27 -05:00
|
|
|
CATEGORIES= net
|
2002-08-01 03:35:52 -04:00
|
|
|
MASTER_SITES= ${MASTER_SITE_ISC}
|
2001-10-15 09:33:15 -04:00
|
|
|
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
|
2001-03-09 10:10:15 -05:00
|
|
|
PKGNAMEPREFIX= isc-
|
2001-03-13 17:07:58 -05:00
|
|
|
PKGNAMESUFFIX= 3
|
2001-04-22 07:59:08 -04:00
|
|
|
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
|
1996-03-08 06:45:10 -05:00
|
|
|
|
2002-01-17 18:13:38 -05:00
|
|
|
MAINTAINER= cyrille.lefevre@laposte.net
|
2003-02-21 08:28:59 -05:00
|
|
|
COMMENT= ISC Dynamic Host Configuration Protocol client and server code
|
1997-06-03 03:35:25 -04:00
|
|
|
|
2002-06-26 12:08:51 -04:00
|
|
|
USE_REINPLACE= yes
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-02-17 09:17:30 -05:00
|
|
|
# Global variables
|
|
|
|
#
|
1999-01-12 22:37:28 -05:00
|
|
|
|
1997-01-14 15:16:10 -05:00
|
|
|
HAS_CONFIGURE= yes
|
1996-03-08 06:45:10 -05:00
|
|
|
|
2001-06-28 21:25:07 -04:00
|
|
|
MAN1= omshell.1
|
2001-06-07 07:17:09 -04:00
|
|
|
MAN3= dhcpctl.3 omapi.3 omshell.3
|
2001-10-15 09:33:15 -04:00
|
|
|
MAN5= dhclient.conf.5 dhclient.leases.5 \
|
2000-07-05 02:32:18 -04:00
|
|
|
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
|
1997-12-01 18:49:12 -05:00
|
|
|
dhcpd.leases.5
|
2001-06-28 21:25:07 -04:00
|
|
|
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
|
1996-11-18 06:44:27 -05:00
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
MSG_FILE= ${PKGDIR}/pkg-message
|
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
|
2001-02-17 09:17:30 -05:00
|
|
|
# Local variables
|
|
|
|
#
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
# for instance, possible versions are:
|
2001-04-22 07:59:08 -04:00
|
|
|
# 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
|
2001-10-15 09:33:15 -04:00
|
|
|
# so, the magic things are:
|
2001-04-22 07:59:08 -04:00
|
|
|
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
|
|
|
|
|
2001-03-22 20:33:47 -05:00
|
|
|
PATCH_SUBDIRS= common minires dst omapip server client relay dhcpctl
|
2001-02-17 09:17:30 -05:00
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
BIN_FILES= dhclient dhcpd dhcrelay omshell
|
2001-05-21 15:30:29 -04:00
|
|
|
CONF_FILES= dhclient.conf
|
2001-10-15 09:33:15 -04:00
|
|
|
RC_FILES= isc-dhcpd isc-dhcrelay
|
2001-10-18 23:12:25 -04:00
|
|
|
DOC_FILES= ANONCVS CHANGES COPYRIGHT README RELNOTES
|
2001-10-15 09:33:15 -04:00
|
|
|
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
|
2001-02-17 09:17:30 -05:00
|
|
|
DATA_FILES= dhclient.leases dhcpd.leases
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
SAMP_SUFX= .sample
|
|
|
|
|
|
|
|
CONF_DIR= ${PREFIX}/etc
|
|
|
|
RC_DIR= ${PREFIX}/etc/rc.d
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
|
|
|
|
DATADIR= /var/db
|
2001-02-17 09:17:30 -05:00
|
|
|
|
2001-05-21 15:30:29 -04:00
|
|
|
STRIP_CMD?= strip
|
2001-02-17 09:17:30 -05:00
|
|
|
|
|
|
|
# Post-patch
|
|
|
|
#
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
post-patch: patch-scripts patch-makefile-conf \
|
|
|
|
patch-makefiles-dist patch-man-pages \
|
2002-11-05 21:06:03 -05:00
|
|
|
patch-pkgmessage
|
2001-02-17 09:17:30 -05:00
|
|
|
|
|
|
|
patch-scripts:
|
2002-06-24 00:44:17 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
2001-02-17 09:17:30 -05:00
|
|
|
${WRKSRC}/client/scripts/freebsd
|
|
|
|
|
2001-03-22 20:33:47 -05:00
|
|
|
patch-makefile-conf:
|
2002-06-24 00:44:17 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|^DEBUG[ ]*=|# DEBUG ?=|g' \
|
2001-03-22 20:33:47 -05:00
|
|
|
${WRKSRC}/Makefile.conf
|
|
|
|
|
|
|
|
patch-makefiles-dist:
|
2001-02-17 09:17:30 -05:00
|
|
|
.for subdir in ${PATCH_SUBDIRS}
|
2002-06-24 00:44:17 -04:00
|
|
|
@${REINPLACE_CMD} -e 's|^CFLAGS[ ]*=|CFLAGS +=|g' \
|
2001-02-17 09:17:30 -05:00
|
|
|
${WRKSRC}/${subdir}/Makefile.dist
|
|
|
|
.endfor
|
|
|
|
|
2001-05-21 15:30:29 -04:00
|
|
|
# temporary hack - no patch file needed for this typo.
|
|
|
|
patch-man-pages:
|
2002-06-24 00:44:17 -04:00
|
|
|
@${REINPLACE_CMD} -e '/^\.Fd$$/d' ${WRKSRC}/dhcpctl/dhcpctl.3
|
2001-05-21 15:30:29 -04:00
|
|
|
|
2002-11-05 21:06:03 -05:00
|
|
|
patch-pkgmessage:
|
2001-10-15 09:33:15 -04:00
|
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g;s|%%MAN1PREFIX%%|${MAN1PREFIX}|g' \
|
|
|
|
${MSG_FILE} > ${PKGMESSAGE}
|
|
|
|
|
2001-02-17 09:17:30 -05:00
|
|
|
# Post-install
|
|
|
|
#
|
|
|
|
|
|
|
|
post-install: strip-binary-files install-startup-files \
|
|
|
|
install-doc-files install-sample-files \
|
2001-10-15 09:33:15 -04:00
|
|
|
create-conf-files create-data-files \
|
|
|
|
display-message
|
2001-02-17 09:17:30 -05:00
|
|
|
|
|
|
|
strip-binary-files:
|
|
|
|
.for file in ${BIN_FILES}
|
2001-10-15 09:33:15 -04:00
|
|
|
.if exists(${PREFIX}/bin/${file})
|
|
|
|
@${STRIP_CMD} ${PREFIX}/bin/${file}
|
|
|
|
.endif
|
|
|
|
.if exists(${PREFIX}/sbin/${file})
|
|
|
|
@${STRIP_CMD} ${PREFIX}/sbin/${file}
|
2000-12-02 03:49:49 -05:00
|
|
|
.endif
|
2001-02-17 09:17:30 -05:00
|
|
|
.endfor
|
2000-12-02 03:49:49 -05:00
|
|
|
|
2001-02-17 09:17:30 -05:00
|
|
|
install-startup-files:
|
2001-10-15 09:33:15 -04:00
|
|
|
.for file in ${RC_FILES}
|
|
|
|
.if exists(${FILESDIR}/rc.${file}.conf${SAMP_SUFX})
|
|
|
|
@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf${SAMP_SUFX} ${CONF_DIR}
|
|
|
|
.if !exists(${CONF_DIR}/rc.${file}.conf)
|
|
|
|
@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf${SAMP_SUFX} \
|
|
|
|
${CONF_DIR}/rc.${file}.conf
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.if exists(${FILESDIR}/${file}.sh${SAMP_SUFX})
|
|
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh${SAMP_SUFX} ${RC_DIR}
|
|
|
|
.endif
|
2000-09-30 15:47:32 -04:00
|
|
|
.endfor
|
2000-06-14 12:21:21 -04:00
|
|
|
|
2001-02-17 09:17:30 -05:00
|
|
|
install-doc-files:
|
|
|
|
.if !defined(NOPORTDOCS)
|
2001-10-15 09:33:15 -04:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2001-02-17 09:17:30 -05:00
|
|
|
.for file in ${DOC_FILES}
|
2001-10-15 09:33:15 -04:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
|
2001-02-17 09:17:30 -05:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
|
|
|
install-sample-files:
|
|
|
|
.for file in ${SAMP_FILES}
|
2001-10-15 09:33:15 -04:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${file} ${CONF_DIR}/${file:T}${SAMP_SUFX}
|
2001-02-17 09:17:30 -05:00
|
|
|
.endfor
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
create-conf-files:
|
|
|
|
.for file in ${CONF_FILES}
|
|
|
|
.if !exists(${CONF_DIR}/${file})
|
|
|
|
@${TOUCH} ${CONF_DIR}/${file}
|
2001-02-17 09:17:30 -05:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
create-data-files:
|
|
|
|
.for file in ${DATA_FILES}
|
|
|
|
.if !exists(${DATADIR}/${file})
|
|
|
|
@${TOUCH} ${DATADIR}/${file}
|
2001-02-17 09:17:30 -05:00
|
|
|
.endif
|
1998-05-23 23:04:27 -04:00
|
|
|
.endfor
|
1997-11-14 09:19:06 -05:00
|
|
|
|
2001-10-15 09:33:15 -04:00
|
|
|
display-message:
|
2001-10-18 23:12:25 -04:00
|
|
|
@${ECHO_MSG}
|
2001-10-15 09:33:15 -04:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2001-10-18 23:12:25 -04:00
|
|
|
@${ECHO_MSG}
|
2001-10-15 09:33:15 -04:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|