View | Details | Raw Unified | Return to bug 71030
Collapse All | Expand All

(-)Makefile (-3 / +58 lines)
Lines 30-36 Link Here
30
.endif
30
.endif
31
.if ${SUBSYS} == server
31
.if ${SUBSYS} == server
32
OPTIONS=	DHCP_PARANOIA "add -user, -group and -chroot options" on \
32
OPTIONS=	DHCP_PARANOIA "add -user, -group and -chroot options" on \
33
		DHCP_JAIL "add -chroot and -jail options" on
33
		DHCP_JAIL "add -chroot and -jail options" on \
34
		DHCP_LDAP "add experimental LDAP backend support" off \
35
		DHCP_LDAP_SSL "support LDAP connection over SSL/TLS" on
34
.endif
36
.endif
35
37
36
.include <bsd.port.pre.mk>
38
.include <bsd.port.pre.mk>
Lines 118-123 Link Here
118
.endif
120
.endif
119
.if !defined(NOPORTDOCS)
121
.if !defined(NOPORTDOCS)
120
PORTDOCS=	LICENSE README RELNOTES
122
PORTDOCS=	LICENSE README RELNOTES
123
.if ${SUBSYS} == server
124
.ifdef(WITH_DHCP_LDAP)
125
PORTDOCS+=	README.ldap
126
.endif
127
.endif
121
.endif
128
.endif
122
129
123
SAMP_SUFX=	.sample
130
SAMP_SUFX=	.sample
Lines 139-145 Link Here
139
.else
146
.else
140
RCSCRIPTS_SUB+=	JAIL=NO
147
RCSCRIPTS_SUB+=	JAIL=NO
141
.endif
148
.endif
142
PKGMESSAGE_SUB=	PREFIX=${PREFIX} MAN1PREFIX=${MAN1PREFIX}
149
PKGMESSAGE_SUB=	PREFIX=${PREFIX} MAN1PREFIX=${MAN1PREFIX} \
150
		DOCSDIR=${DOCSDIR} SCHEMA_DIR=${SCHEMA_DIR}
151
152
.if ${SUBSYS} == server
153
.ifdef(WITH_DHCP_LDAP)
154
# Based on patch from Brian Masney.
155
# http://www.newwave.net/~masneyb/
156
PATCH_SITES=	http://www.newwave.net/~masneyb/
157
PATCHFILES=	${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}-ldap-patch
158
PATCH_DIST_STRIP=	-p1
159
USE_PERL5_RUN=	yes
160
USE_OPENLDAP=	yes
161
LDAP_SCRIPT=	contrib/dhcpd-conf-to-ldap.pl
162
LDAP_SCHEMA=	contrib/dhcp.schema
163
SCHEMA_DIR=	${PREFIX}/share/${PKGBASE}
164
PLIST_SUB+=	LDAP="" \
165
		PKGBASE=${PKGBASE}
166
.if defined(WITH_DHCP_LDAP_SSL)
167
USE_OPENSSL=	yes
168
# hack to get bsd.openssl.mk included at this late state
169
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
170
.endif
171
.else
172
PLIST_SUB+=	LDAP="@comment "
173
.endif
174
.endif
143
175
144
# Post-extract
176
# Post-extract
145
#
177
#
Lines 179-184 Link Here
179
.if !defined(WITHOUT_DHCP_JAIL)
211
.if !defined(WITHOUT_DHCP_JAIL)
180
	@${ECHO_CMD} CFLAGS += -DJAIL >> ${WRKSRC}/site.conf
212
	@${ECHO_CMD} CFLAGS += -DJAIL >> ${WRKSRC}/site.conf
181
.endif
213
.endif
214
.ifdef(WITH_DHCP_LDAP)
215
	@${ECHO_CMD} CFLAGS += -I${LOCALBASE}/include >> ${WRKSRC}/site.conf
216
	@${ECHO_CMD} LIBS += -L${LOCALBASE}/lib >> ${WRKSRC}/site.conf
217
.ifdef(WITH_DHCP_LDAP_SSL)
218
	@${ECHO_CMD} CFLAGS += -DUSE_SSL -I${OPENSSLINC} >> ${WRKSRC}/site.conf
219
	@${ECHO_CMD} LIBS += -L${OPENSSLLIB} >> ${WRKSRC}/site.conf
220
	@${ECHO_CMD} LIBS += -lcrypto -lssl >> ${WRKSRC}/site.conf
221
.endif
222
.endif
182
.endif
223
.endif
183
224
184
patch-makefile-conf:
225
patch-makefile-conf:
Lines 205-210 Link Here
205
.if ${SUBSYS} != devel
246
.if ${SUBSYS} != devel
206
	@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
247
	@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
207
		${MSG_FILE} > ${PKGMESSAGE}
248
		${MSG_FILE} > ${PKGMESSAGE}
249
.ifndef(WITH_DHCP_LDAP)
250
	@${REINPLACE_CMD} -e '/^%%LDAP%%/d' ${PKGMESSAGE}
251
.else
252
	@${REINPLACE_CMD} -e 's|^%%LDAP%%||g' ${PKGMESSAGE}
253
.endif
208
.endif
254
.endif
209
255
210
# Post-install
256
# Post-install
Lines 216-222 Link Here
216
262
217
parallel-post-install: \
263
parallel-post-install: \
218
	strip-binary-files install-startup-files \
264
	strip-binary-files install-startup-files \
219
	install-doc-files install-sample-files \
265
	install-doc-files install-ldap-files install-sample-files \
220
	create-conf-files create-data-files
266
	create-conf-files create-data-files
221
267
222
strip-binary-files:
268
strip-binary-files:
Lines 242-247 Link Here
242
.endfor
288
.endfor
243
.endif
289
.endif
244
290
291
install-ldap-files:
292
.if ${SUBSYS} == server
293
.ifdef(WITH_DHCP_LDAP)
294
	@${INSTALL_SCRIPT} ${WRKSRC}/${LDAP_SCRIPT} ${PREFIX}/bin
295
	@${MKDIR} ${SCHEMA_DIR}
296
	@${INSTALL_DATA} ${WRKSRC}/${LDAP_SCHEMA} ${SCHEMA_DIR}
297
.endif
298
.endif
299
245
install-sample-files:
300
install-sample-files:
246
.for f in ${SAMP_FILES}
301
.for f in ${SAMP_FILES}
247
	@${INSTALL_DATA} ${WRKSRC}/${f} ${CONF_DIR}/${f:T}${SAMP_SUFX}
302
	@${INSTALL_DATA} ${WRKSRC}/${f} ${CONF_DIR}/${f:T}${SAMP_SUFX}
(-)distinfo (+2 lines)
Lines 1-2 Link Here
1
MD5 (dhcp-3.0.1rc14.tar.gz) = a68074d9ebdeb355c293d9b3645b3c2c
1
MD5 (dhcp-3.0.1rc14.tar.gz) = a68074d9ebdeb355c293d9b3645b3c2c
2
SIZE (dhcp-3.0.1rc14.tar.gz) = 842712
2
SIZE (dhcp-3.0.1rc14.tar.gz) = 842712
3
MD5 (dhcp-3.0.1rc14-ldap-patch) = 38fde70e0f27758da2be70ce46c17f8b
4
SIZE (dhcp-3.0.1rc14-ldap-patch) = 152494
(-)pkg-message (+6 lines)
Lines 39-41 Link Here
39
      variables are still read there but should be moved /etc/rc.conf or
39
      variables are still read there but should be moved /etc/rc.conf or
40
      /etc/rc.conf.d/dhcpd instead.  Also, the dhcpd_options variable must
40
      /etc/rc.conf.d/dhcpd instead.  Also, the dhcpd_options variable must
41
      be renamed dhcpd_flags if any.
41
      be renamed dhcpd_flags if any.
42
%%LDAP%%
43
%%LDAP%%****  You have requested support for the LDAP configuration backend.
44
%%LDAP%%      The OpenLDAP schema file is installed as
45
%%LDAP%%      %%SCHEMA_DIR%%/dhcp.schema.
46
%%LDAP%%      See %%DOCSDIR%%/README.ldap for further
47
%%LDAP%%      LDAP configuration details.
(-)pkg-plist (+3 lines)
Lines 1-5 Link Here
1
@comment $FreeBSD: ports/net/isc-dhcp3-server/pkg-plist,v 1.29 2004/06/26 14:32:40 eik Exp $
1
@comment $FreeBSD: ports/net/isc-dhcp3-server/pkg-plist,v 1.29 2004/06/26 14:32:40 eik Exp $
2
bin/omshell
2
bin/omshell
3
%%LDAP%%bin/dhcpd-conf-to-ldap.pl
3
etc/dhcpd.conf.sample
4
etc/dhcpd.conf.sample
4
etc/rc.d/isc-dhcpd.sh
5
etc/rc.d/isc-dhcpd.sh
5
sbin/dhcpd
6
sbin/dhcpd
7
%%LDAP%%share/%%PKGBASE%%/dhcp.schema
8
%%LDAP%%@dirrm share/%%PKGBASE%%

Return to bug 71030