Skip to content

Commit

Permalink
isc-dhcp4: add LDAP as an option; pkglint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adam committed Aug 27, 2019
1 parent 4dc476f commit 422b046
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions net/isc-dhclient4/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 2014/10/14 13:53:00 taca Exp $
# $NetBSD: Makefile,v 1.12 2019/08/27 08:12:01 adam Exp $

PKGNAME= isc-dhclient-${DHVER}
COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Client
Expand All @@ -10,7 +10,7 @@ CONF_FILES+= ${EGDIR}/dhclient.conf ${PKG_SYSCONFDIR}/dhclient.conf
RCD_SCRIPTS= isc_dhclient
FILES_SUBST+= DHCP_HOME=${DHCP_HOME}

.include "${.CURDIR}/../isc-dhcp4/options.mk"
.include "../../net/isc-dhcp4/options.mk"

INSTALLATION_DIRS+= ${EGDIR}

Expand Down
10 changes: 5 additions & 5 deletions net/isc-dhcp4/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.38 2019/06/18 20:02:24 nia Exp $
# $NetBSD: Makefile.common,v 1.39 2019/08/27 08:12:01 adam Exp $
#
# used by net/isc-dhcp4/Makefile
# used by net/isc-dhcpd4/Makefile
Expand Down Expand Up @@ -29,8 +29,8 @@ PKG_SYSCONFSUBDIR= dhcp
USE_TOOLS+= gmake gunzip gzip tar
USE_LANGUAGES+= c99 c++

PATCHDIR= ${.CURDIR}/../isc-dhcp4/patches
DISTINFO_FILE= ${.CURDIR}/../isc-dhcp4/distinfo
PATCHDIR= ${.CURDIR}/../../net/isc-dhcp4/patches
DISTINFO_FILE= ${.CURDIR}/../../net/isc-dhcp4/distinfo
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
BUILD_DEFS+= VARBASE DHCP_HOME DHCP_PID

Expand Down Expand Up @@ -63,15 +63,15 @@ SUBST_CLASSES+= config
SUBST_STAGE.config= pre-configure
SUBST_FILES.config= includes/dhcpd.h
SUBST_VARS.config= PREFIX PKG_SYSCONFDIR
SUBST_MESSAGE.config= Fixing configuration files.
SUBST_MESSAGE.config= Fixing configuration files.

BUILD_DIRS= ${BUILD_SUBDIR}
INSTALL_DIRS= ${SUBDIR}

# XXX This crap should replaced by a dependency on net/libbind, but
# that seems to be a different version of libbind.
post-extract:
(cd ${WRKSRC}/bind && gunzip -c bind.tar.gz | tar xf -)
cd ${WRKSRC}/bind && ${TAR} -zxf bind.tar.gz

BIND_CONFIGURE_ARGS+= --disable-kqueue
BIND_CONFIGURE_ARGS+= --disable-epoll
Expand Down
12 changes: 10 additions & 2 deletions net/isc-dhcp4/options.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $NetBSD: options.mk,v 1.2 2012/06/12 15:45:59 wiz Exp $
# $NetBSD: options.mk,v 1.3 2019/08/27 08:12:01 adam Exp $

PKG_OPTIONS_VAR= PKG_OPTIONS.dhcp
PKG_SUPPORTED_OPTIONS+= inet6
PKG_SUPPORTED_OPTIONS+= inet6 ldap
PKG_SUGGESTED_OPTIONS= inet6

.include "../../mk/bsd.options.mk"
Expand All @@ -14,3 +14,11 @@ CONFIGURE_ARGS+= --enable-dhcpv6
.else
CONFIGURE_ARGS+= --disable-dhcpv6
.endif

.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap
CONFIGURE_ARGS+= --with-ldapcrypto
.include "../../databases/openldap-client/buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-ldap
.endif
4 changes: 2 additions & 2 deletions net/isc-dhcpd4/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.13 2014/10/14 13:53:01 taca Exp $
# $NetBSD: Makefile,v 1.14 2019/08/27 08:12:01 adam Exp $

PKGNAME= isc-dhcpd-${DHVER}
COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Server
Expand All @@ -14,7 +14,7 @@ SMF_METHODS= isc-dhcpd
FILES_SUBST+= DHCP_HOME=${DHCP_HOME:Q}
FILES_SUBST+= DHCP_PID=${DHCP_PID:Q}

.include "${.CURDIR}/../isc-dhcp4/options.mk"
.include "../../net/isc-dhcp4/options.mk"

INSTALLATION_DIRS+= ${EGDIR}

Expand Down
4 changes: 2 additions & 2 deletions net/isc-dhcrelay4/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2014/10/14 13:53:01 taca Exp $
# $NetBSD: Makefile,v 1.11 2019/08/27 08:12:01 adam Exp $

PKGNAME= isc-dhcrelay-${DHVER}
COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Relay
Expand All @@ -8,7 +8,7 @@ SUBDIR= relay
RCD_SCRIPTS= isc_dhcrelay
FILES_SUBST+= DHCP_HOME=${DHCP_HOME}

.include "${.CURDIR}/../isc-dhcp4/options.mk"
.include "../../net/isc-dhcp4/options.mk"

.include "../../net/isc-dhcp4/Makefile.common"
.include "../../net/isc-dhcp4/buildlink3.mk"
Expand Down

0 comments on commit 422b046

Please sign in to comment.