freebsd-ports/net/isc-dhcp3-server/Makefile
Peter Pentchev 5306c9a613 Update to 3.0 RC 2 patch-level 1.
Install docs into a version-dependent dir.
Add a backup MASTER_SITE_SUBDIR.

PR:		26835
Submitted by:	maintainer
2001-04-25 12:13:34 +00:00

144 lines
3.1 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: dhcp
# Date created: 7 Mar 1996
# Whom: se
#
# $FreeBSD$
#
PORTNAME= dhcp
PORTVERSION= 3.0.r2.1
CATEGORIES= net
MASTER_SITES= ftp://ftp.isc.org/isc/dhcp/%SUBDIR%/
MASTER_SITE_SUBDIR= . dhcp-3.0-history
PKGNAMEPREFIX= isc-
PKGNAMESUFFIX= 3
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= clefevre@poboxes.com
#
# Global variables
#
HAS_CONFIGURE= yes
PLIST_SUB= PKGBASE="${PKGBASE}"
MAN3= dhcpctl.3 omapi.3
MAN5= dhclient.conf.5 dhclient.leases.5 dhcp-contrib.5 \
dhcp-eval.5 dhcp-options.5 dhcpd.conf.5 \
dhcpd.leases.5
MAN8= dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
#
# Local variables
#
# for instance, possible version formats are, in order:
# 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
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 server client relay dhcpctl
BIN_FILES= dhclient dhcpd dhcrelay
SAMP_FILES= client/dhclient.conf server/dhcpd.conf
RCD_FILES= isc-dhcpd.sh.sample
DOC_FILES= CHANGES COPYRIGHT README RELNOTES
DATA_FILES= dhclient.leases dhcpd.leases
CONF_FILES= dhclient.conf
BIN_DIR= ${PREFIX}/sbin
ETC_DIR= ${PREFIX}/etc
RCD_DIR= ${PREFIX}/etc/rc.d
DOC_DIR= ${PREFIX}/share/doc/${PKGBASE}
VARDB_DIR= /var/db
VARRUN_DIR= /var/run
STRIP?= strip
#
# Post-patch
#
post-patch: patch-scripts patch-makefile-conf patch-makefiles-dist
patch-scripts:
@${PERL} -pi.fbsd -e 's.!!PREFIX!!.${PREFIX}.g' \
${WRKSRC}/client/scripts/freebsd
patch-makefile-conf:
@${PERL} -pi.fbsd -e 's|^DEBUG[ ]*=|# DEBUG ?=|g' \
${WRKSRC}/Makefile.conf
patch-makefiles-dist:
.for subdir in ${PATCH_SUBDIRS}
@${PERL} -pi.fbsd -e 's|^CFLAGS[ ]*=|CFLAGS +=|g' \
${WRKSRC}/${subdir}/Makefile.dist
.endfor
#
# Post-install
#
post-install: strip-binary-files install-startup-files \
install-doc-files install-sample-files \
create-data-files create-conf-files
strip-binary-files:
.for file in ${BIN_FILES}
.if exists({BIN_DIR}/${file})
@${STRIP} ${BIN_DIR}/${file}
.endif
.endfor
install-startup-files:
.for file in ${RCD_FILES}
@${INSTALL_SCRIPT} ${FILESDIR}/${file} ${RCD_DIR}/${file}
.endfor
install-doc-files:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOC_DIR}
.for file in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOC_DIR}/${file}
.endfor
.endif
install-sample-files:
.for file in ${SAMP_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${ETC_DIR}/${file:T}.sample
.endfor
create-data-files:
.for file in ${DATA_FILES}
.if !exists(${VARDB_DIR}/${file})
@${TOUCH} ${VARDB_DIR}/${file}
.endif
.endfor
create-conf-files:
.for file in ${CONF_FILES}
.if !exists(${ETC_DIR}/${file})
@${TOUCH} ${ETC_DIR}/${file}
.endif
.endfor
.include <bsd.port.mk>