aboutsummaryrefslogtreecommitdiff
path: root/net/isc-dhcp41-server/Makefile
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-03-26 17:27:24 +0000
committerRenato Botelho <garga@FreeBSD.org>2014-03-26 17:27:24 +0000
commited7127a511f49ded90c608d80e713304b8ef8cf3 (patch)
tree17ca4efef172658bab3ec02466e80754ff5b8eaf /net/isc-dhcp41-server/Makefile
parent9fa06126e0d67f5bd3842aec898be54de83ab874 (diff)
downloadports-ed7127a511f49ded90c608d80e713304b8ef8cf3.tar.gz
ports-ed7127a511f49ded90c608d80e713304b8ef8cf3.zip
Notes
Diffstat (limited to 'net/isc-dhcp41-server/Makefile')
-rw-r--r--net/isc-dhcp41-server/Makefile70
1 files changed, 23 insertions, 47 deletions
diff --git a/net/isc-dhcp41-server/Makefile b/net/isc-dhcp41-server/Makefile
index 588dcb2d5bb3..e91ac43892d3 100644
--- a/net/isc-dhcp41-server/Makefile
+++ b/net/isc-dhcp41-server/Makefile
@@ -58,26 +58,11 @@ GNU_CONFIGURE= yes
CPPFLAGS+= -D_PATH_DHCLIENT_SCRIPT='\"${PREFIX}/sbin/dhclient-script\"' -D_PATH_DHCLIENT_CONF='\"${PREFIX}/etc/dhclient.conf\"' -D_PATH_DHCPD_CONF='\"${PREFIX}/etc/dhcpd.conf\"'
SCRIPTS_ENV+= PKG_PREFIX=${PREFIX}
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if ${SUBSYS} == client
-MAN5+= dhclient.conf.5 dhclient.leases.5
-MAN8+= dhclient.8 dhclient-script.8
-CONF_FILE= dhclient.conf
-.elif ${SUBSYS} == server
+.if ${SUBSYS} == server
CONFIGURE_ARGS+= --localstatedir=/var
-MAN5+= dhcpd.conf.5 dhcpd.leases.5 dhcp-eval.5 dhcp-options.5
-MAN8+= dhcpd.8
-MAN1= omshell.1
-MAN3= dhcpctl.3 omapi.3
CFLAGS+= -fPIC
-CONF_FILE= dhcpd.conf
-.if ${PORT_OPTIONS:MIPV6}
-CONF_FILE+= dhcpd6.conf
-.endif
-.else
-MAN8+= dhcrelay.8
.endif
DESCR= ${.CURDIR}/pkg-descr
@@ -134,9 +119,6 @@ CONFIGURE_ENV+= LIBS="-lssl"
.if ${PORT_OPTIONS:MPARANOIA}
CONFIGURE_ARGS+= --enable-paranoia --enable-early-chroot
-SUB_LIST+= PARANOIA=yes
-.else
-SUB_LIST+= PARANOIA=no
.endif
.if ${PORT_OPTIONS:MIPV6}
@@ -158,49 +140,46 @@ post-patch:
${MSG_FILE} > ${PKGMESSAGE}
@${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/client/dhclient.conf
+ @${REINPLACE_CMD} -e '/echo.*RANLIB/,+1d' \
+ ${WRKSRC}/Makefile.in \
+ ${WRKSRC}/*/Makefile.in
+
do-install:
- ${MAKE} -C ${WRKSRC}/${SUBSYS} install
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/${SUBSYS} install
.if ${SUBSYS} == server
- ${MAKE} -C ${WRKSRC}/dhcpctl install
- ${MAKE} -C ${WRKSRC}/dst install
- ${MAKE} -C ${WRKSRC}/omapip install
- ${MAKE} -C ${WRKSRC}/includes install
- ${MAKE} -C ${WRKSRC}/common install
- ${INSTALL_DATA} ${WRKSRC}/dhcpctl/dhcpctl.h ${PREFIX}/include
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/dhcpctl install
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/dst install
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/omapip install
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/includes install
+ ${SETENV} DESTDIR=${STAGEDIR} ${MAKE} -C ${WRKSRC}/common install
+ ${INSTALL_DATA} ${WRKSRC}/dhcpctl/dhcpctl.h ${STAGEDIR}${PREFIX}/include
.if ${PORT_OPTIONS:MIPV6}
${INSTALL_DATA} ${WRKSRC}/doc/examples/dhcpd-dhcpv6.conf \
- ${PREFIX}/etc/dhcpd6.conf.sample
+ ${STAGEDIR}${PREFIX}/etc/dhcpd6.conf.sample
.endif
.endif
.if ${PORT_OPTIONS:MLDAP}
- @${MKDIR} ${SCHEMA_DIR}
- ${INSTALL_DATA} ${LDAP_SCHEMA} ${SCHEMA_DIR}
- ${INSTALL_SCRIPT} ${LDAP_SCRIPT} ${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${SCHEMA_DIR}
+ ${INSTALL_DATA} ${LDAP_SCHEMA} ${STAGEDIR}${SCHEMA_DIR}
+ ${INSTALL_SCRIPT} ${LDAP_SCRIPT} ${STAGEDIR}${PREFIX}/bin
.endif
-.if ${PORT_OPTIONS:MLDAP} && !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_MAN} ${WRKDIR}/${LDAPPATCHDIST}/README.ldap ${DOCSDIR}
- ${INSTALL_MAN} ${WRKDIR}/${LDAPPATCHDIST}/LICENSE.ldap ${DOCSDIR}
+.if ${PORT_OPTIONS:MLDAP}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKDIR}/${LDAPPATCHDIST}/README.ldap ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKDIR}/${LDAPPATCHDIST}/LICENSE.ldap ${STAGEDIR}${DOCSDIR}
.endif
post-install:
-.if defined(CONF_FILE)
-.for FILE in ${CONF_FILE}
- if [ ! -f ${PREFIX}/etc/${FILE} ]; then \
- ${CP} -p ${PREFIX}/etc/${FILE}.sample ${PREFIX}/etc/${FILE} ; \
- fi
-.endfor
-.endif
.if ${SUBSYS} == client
- ${INSTALL_SCRIPT} ${WRKSRC}/client/scripts/freebsd ${PREFIX}/sbin/dhclient-script
+ ${INSTALL_SCRIPT} ${WRKSRC}/client/scripts/freebsd ${STAGEDIR}${PREFIX}/sbin/dhclient-script
.elif ${SUBSYS} == server
.if ${PORT_OPTIONS:MIPV6}
- @${LN} -sf isc-dhcpd ${PREFIX}/etc/rc.d/isc-dhcpd6
+ @${LN} -sf isc-dhcpd ${STAGEDIR}${PREFIX}/etc/rc.d/isc-dhcpd6
.endif
.elif ${SUBSYS} == relay
.if ${PORT_OPTIONS:MIPV6}
- @${LN} -sf isc-dhcrelay ${PREFIX}/etc/rc.d/isc-dhcrelay6
+ @${LN} -sf isc-dhcrelay ${STAGEDIR}${PREFIX}/etc/rc.d/isc-dhcrelay6
.endif
.endif
@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
@@ -210,8 +189,5 @@ post-install:
.else
@${REINPLACE_CMD} -e '/^%%LDAP%%/d' ${PKGMESSAGE}
.endif
- @${ECHO_MSG}
- @${CAT} ${PKGMESSAGE}
- @${ECHO_MSG}
.include <bsd.port.mk>