From ed7127a511f49ded90c608d80e713304b8ef8cf3 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 26 Mar 2014 17:27:24 +0000 Subject: [PATCH] Support STAGE --- net/isc-dhcp41-client/Makefile | 1 - net/isc-dhcp41-client/pkg-plist | 4 ++ net/isc-dhcp41-relay/Makefile | 1 - net/isc-dhcp41-relay/pkg-plist | 1 + net/isc-dhcp41-server/Makefile | 70 +++++++++++---------------------- net/isc-dhcp41-server/pkg-plist | 8 ++++ net/isc-dhcp42-client/Makefile | 1 - net/isc-dhcp42-client/pkg-plist | 4 ++ net/isc-dhcp42-relay/Makefile | 1 - net/isc-dhcp42-relay/pkg-plist | 1 + net/isc-dhcp42-server/Makefile | 70 +++++++++++---------------------- net/isc-dhcp42-server/pkg-plist | 10 ++++- net/isc-dhcp43-client/Makefile | 1 - net/isc-dhcp43-client/pkg-plist | 4 ++ net/isc-dhcp43-relay/Makefile | 1 - net/isc-dhcp43-relay/pkg-plist | 1 + net/isc-dhcp43-server/Makefile | 70 +++++++++++---------------------- net/isc-dhcp43-server/pkg-plist | 10 ++++- 18 files changed, 110 insertions(+), 149 deletions(-) diff --git a/net/isc-dhcp41-client/Makefile b/net/isc-dhcp41-client/Makefile index ec0a65a9661c..ab7ebe5ae3ae 100644 --- a/net/isc-dhcp41-client/Makefile +++ b/net/isc-dhcp41-client/Makefile @@ -5,5 +5,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol client SUBSYS= client MASTERDIR= ${.CURDIR}/../isc-dhcp41-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp41-client/pkg-plist b/net/isc-dhcp41-client/pkg-plist index 09e80ced6ead..03c9b70b5de0 100644 --- a/net/isc-dhcp41-client/pkg-plist +++ b/net/isc-dhcp41-client/pkg-plist @@ -1,5 +1,9 @@ sbin/dhclient sbin/dhclient-script +man/man5/dhclient.conf.5.gz +man/man5/dhclient.leases.5.gz +man/man8/dhclient.8.gz +man/man8/dhclient-script.8.gz @unexec if cmp -s %D/etc/dhclient.conf.sample %D/etc/dhclient.conf; then rm -f %D/etc/dhclient.conf; fi etc/dhclient.conf.sample @exec if [ ! -f %D/etc/dhclient.conf ] ; then cp -p %D/%F %B/dhclient.conf; fi diff --git a/net/isc-dhcp41-relay/Makefile b/net/isc-dhcp41-relay/Makefile index 05e0b3be9d4a..e4f9c401ba51 100644 --- a/net/isc-dhcp41-relay/Makefile +++ b/net/isc-dhcp41-relay/Makefile @@ -5,5 +5,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol relay SUBSYS= relay MASTERDIR= ${.CURDIR}/../isc-dhcp41-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp41-relay/pkg-plist b/net/isc-dhcp41-relay/pkg-plist index 20fe50afa398..deb1c2c594d9 100644 --- a/net/isc-dhcp41-relay/pkg-plist +++ b/net/isc-dhcp41-relay/pkg-plist @@ -3,3 +3,4 @@ %%IPV6%%@unexec %D/etc/rc.d/isc-dhcrelay6 forcestop 2>/dev/null || true %%IPV6%%etc/rc.d/isc-dhcrelay6 sbin/dhcrelay +man/man8/dhcrelay.8.gz 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 -.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 diff --git a/net/isc-dhcp41-server/pkg-plist b/net/isc-dhcp41-server/pkg-plist index f09d9dad6558..21c72e231509 100644 --- a/net/isc-dhcp41-server/pkg-plist +++ b/net/isc-dhcp41-server/pkg-plist @@ -10,6 +10,14 @@ etc/dhcpd.conf.sample sbin/dhcpd bin/omshell %%LDAP%%bin/dhcpd-conf-to-ldap +man/man1/omshell.1.gz +man/man3/dhcpctl.3.gz +man/man3/omapi.3.gz +man/man5/dhcpd.conf.5.gz +man/man5/dhcpd.leases.5.gz +man/man5/dhcp-eval.5.gz +man/man5/dhcp-options.5.gz +man/man8/dhcpd.8.gz include/dhcpctl.h include/isc-dhcp/boolean.h include/isc-dhcp/dst.h diff --git a/net/isc-dhcp42-client/Makefile b/net/isc-dhcp42-client/Makefile index 56c2bde1611e..a230abc39157 100644 --- a/net/isc-dhcp42-client/Makefile +++ b/net/isc-dhcp42-client/Makefile @@ -6,5 +6,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol client SUBSYS= client MASTERDIR= ${.CURDIR}/../isc-dhcp42-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp42-client/pkg-plist b/net/isc-dhcp42-client/pkg-plist index 2b1fcd7299cf..4eb1147a2138 100644 --- a/net/isc-dhcp42-client/pkg-plist +++ b/net/isc-dhcp42-client/pkg-plist @@ -1,5 +1,9 @@ sbin/dhclient sbin/dhclient-script +man/man5/dhclient.conf.5.gz +man/man5/dhclient.leases.5.gz +man/man8/dhclient.8.gz +man/man8/dhclient-script.8.gz @unexec if cmp -s %D/etc/dhclient.conf.example %D/etc/dhclient.conf; then rm -f %D/etc/dhclient.conf; fi etc/dhclient.conf.example @exec if [ ! -f %D/etc/dhclient.conf ] ; then cp -p %D/%F %B/dhclient.conf; fi diff --git a/net/isc-dhcp42-relay/Makefile b/net/isc-dhcp42-relay/Makefile index 9fe81063414b..e26a0adc8d79 100644 --- a/net/isc-dhcp42-relay/Makefile +++ b/net/isc-dhcp42-relay/Makefile @@ -6,5 +6,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol relay SUBSYS= relay MASTERDIR= ${.CURDIR}/../isc-dhcp42-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp42-relay/pkg-plist b/net/isc-dhcp42-relay/pkg-plist index 20fe50afa398..deb1c2c594d9 100644 --- a/net/isc-dhcp42-relay/pkg-plist +++ b/net/isc-dhcp42-relay/pkg-plist @@ -3,3 +3,4 @@ %%IPV6%%@unexec %D/etc/rc.d/isc-dhcrelay6 forcestop 2>/dev/null || true %%IPV6%%etc/rc.d/isc-dhcrelay6 sbin/dhcrelay +man/man8/dhcrelay.8.gz diff --git a/net/isc-dhcp42-server/Makefile b/net/isc-dhcp42-server/Makefile index ecdc788172b0..e22f02b21242 100644 --- a/net/isc-dhcp42-server/Makefile +++ b/net/isc-dhcp42-server/Makefile @@ -62,26 +62,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 -.if ${SUBSYS} == client -MAN5+= dhclient.conf.5 dhclient.leases.5 -MAN8+= dhclient.8 dhclient-script.8 -CONF_FILE= dhclient.conf.example -.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 @@ -106,9 +91,6 @@ PKGMESSAGE_SUB= PREFIX="${PREFIX}" MAN1PREFIX="${MAN1PREFIX}" \ .if ${PORT_OPTIONS:MPARANOIA} CONFIGURE_ARGS+=--enable-paranoia --enable-early-chroot -SUB_LIST+= PARANOIA=yes -.else -SUB_LIST+= PARANOIA=no .endif .if ${PORT_OPTIONS:MLDAP} @@ -120,6 +102,8 @@ LDAP_README= ${WRKSRC}/contrib/ldap/README.ldap CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib PORTDOCS+= README.ldap PLIST_SUB+= SCHEMA_DIR="${SCHEMA_DIR:S,^${PREFIX}/,,}" LDAP="" +USES+= shebangfix +SHEBANG_FILES= contrib/ldap/dhcpd-conf-to-ldap .else PLIST_SUB+= LDAP="@comment " .endif @@ -152,55 +136,47 @@ post-patch: ${WRKSRC}/doc/examples/dhcpd-dhcpv6.conf @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/client/dhclient.conf.example + @${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.example + ${STAGEDIR}${PREFIX}/etc/dhcpd6.conf.example .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} && ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - ${INSTALL_MAN} ${LDAP_README} ${DOCSDIR} +.if ${PORT_OPTIONS:MLDAP} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${LDAP_README} ${STAGEDIR}${DOCSDIR} .endif .endif post-install: -.if defined(CONF_FILE) -.for FILE in ${CONF_FILE} - if [ ! -f ${PREFIX}/etc/${FILE} ]; then \ - ${CP} -p ${PREFIX}/etc/${FILE}.example ${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/=/%%!/} \ ${MSG_FILE} > ${PKGMESSAGE} -#@${REINPLACE_CMD} -e '/^%%LDAP%%/d' ${PKGMESSAGE} - @${ECHO_MSG} - @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} .include diff --git a/net/isc-dhcp42-server/pkg-plist b/net/isc-dhcp42-server/pkg-plist index c68d9fd7b1a8..1c8b406c3679 100644 --- a/net/isc-dhcp42-server/pkg-plist +++ b/net/isc-dhcp42-server/pkg-plist @@ -1,5 +1,5 @@ -@unexec if cmp -s %D/etc/dhcpd.conf.example %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi @unexec echo "You should stop the dhcpd and dhcpd6 daemons if you are permanently removing this port." +@unexec if cmp -s %D/etc/dhcpd.conf.example %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi etc/dhcpd.conf.example @exec if [ ! -f %D/etc/dhcpd.conf ] ; then cp -p %D/%F %B/dhcpd.conf; fi %%IPV6%%@unexec if cmp -s %D/etc/dhcpd6.conf.example %D/etc/dhcpd6.conf; then rm -f %D/etc/dhcpd6.conf; fi @@ -9,6 +9,14 @@ etc/dhcpd.conf.example sbin/dhcpd bin/omshell %%LDAP%%bin/dhcpd-conf-to-ldap +man/man1/omshell.1.gz +man/man3/dhcpctl.3.gz +man/man3/omapi.3.gz +man/man5/dhcpd.conf.5.gz +man/man5/dhcpd.leases.5.gz +man/man5/dhcp-eval.5.gz +man/man5/dhcp-options.5.gz +man/man8/dhcpd.8.gz include/dhcpctl.h include/isc-dhcp/dst.h include/omapip/alloc.h diff --git a/net/isc-dhcp43-client/Makefile b/net/isc-dhcp43-client/Makefile index 26b1eee71009..d4e53bf5bf4a 100644 --- a/net/isc-dhcp43-client/Makefile +++ b/net/isc-dhcp43-client/Makefile @@ -6,5 +6,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol client SUBSYS= client MASTERDIR= ${.CURDIR}/../isc-dhcp43-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp43-client/pkg-plist b/net/isc-dhcp43-client/pkg-plist index 2b1fcd7299cf..4eb1147a2138 100644 --- a/net/isc-dhcp43-client/pkg-plist +++ b/net/isc-dhcp43-client/pkg-plist @@ -1,5 +1,9 @@ sbin/dhclient sbin/dhclient-script +man/man5/dhclient.conf.5.gz +man/man5/dhclient.leases.5.gz +man/man8/dhclient.8.gz +man/man8/dhclient-script.8.gz @unexec if cmp -s %D/etc/dhclient.conf.example %D/etc/dhclient.conf; then rm -f %D/etc/dhclient.conf; fi etc/dhclient.conf.example @exec if [ ! -f %D/etc/dhclient.conf ] ; then cp -p %D/%F %B/dhclient.conf; fi diff --git a/net/isc-dhcp43-relay/Makefile b/net/isc-dhcp43-relay/Makefile index 55b87dcf7c91..39568715c045 100644 --- a/net/isc-dhcp43-relay/Makefile +++ b/net/isc-dhcp43-relay/Makefile @@ -6,5 +6,4 @@ COMMENT= The ISC Dynamic Host Configuration Protocol relay SUBSYS= relay MASTERDIR= ${.CURDIR}/../isc-dhcp43-server -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/net/isc-dhcp43-relay/pkg-plist b/net/isc-dhcp43-relay/pkg-plist index 20fe50afa398..deb1c2c594d9 100644 --- a/net/isc-dhcp43-relay/pkg-plist +++ b/net/isc-dhcp43-relay/pkg-plist @@ -3,3 +3,4 @@ %%IPV6%%@unexec %D/etc/rc.d/isc-dhcrelay6 forcestop 2>/dev/null || true %%IPV6%%etc/rc.d/isc-dhcrelay6 sbin/dhcrelay +man/man8/dhcrelay.8.gz diff --git a/net/isc-dhcp43-server/Makefile b/net/isc-dhcp43-server/Makefile index 49b65e7c9814..953b6e8188b5 100644 --- a/net/isc-dhcp43-server/Makefile +++ b/net/isc-dhcp43-server/Makefile @@ -62,26 +62,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 -.if ${SUBSYS} == client -MAN5+= dhclient.conf.5 dhclient.leases.5 -MAN8+= dhclient.8 dhclient-script.8 -CONF_FILE= dhclient.conf.example -.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 @@ -106,9 +91,6 @@ PKGMESSAGE_SUB= PREFIX="${PREFIX}" MAN1PREFIX="${MAN1PREFIX}" \ .if ${PORT_OPTIONS:MPARANOIA} CONFIGURE_ARGS+=--enable-paranoia --enable-early-chroot -SUB_LIST+= PARANOIA=yes -.else -SUB_LIST+= PARANOIA=no .endif .if ${PORT_OPTIONS:MLDAP} @@ -120,6 +102,8 @@ LDAP_README= ${WRKSRC}/contrib/ldap/README.ldap CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib PORTDOCS+= README.ldap PLIST_SUB+= SCHEMA_DIR="${SCHEMA_DIR:S,^${PREFIX}/,,}" LDAP="" +USES+= shebangfix +SHEBANG_FILES= contrib/ldap/dhcpd-conf-to-ldap .else PLIST_SUB+= LDAP="@comment " .endif @@ -152,55 +136,47 @@ post-patch: ${WRKSRC}/doc/examples/dhcpd-dhcpv6.conf @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/client/dhclient.conf.example + @${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.example + ${STAGEDIR}${PREFIX}/etc/dhcpd6.conf.example .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} && ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR} - ${INSTALL_MAN} ${LDAP_README} ${DOCSDIR} +.if ${PORT_OPTIONS:MLDAP} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${LDAP_README} ${STAGEDIR}${DOCSDIR} .endif .endif post-install: -.if defined(CONF_FILE) -.for FILE in ${CONF_FILE} - if [ ! -f ${PREFIX}/etc/${FILE} ]; then \ - ${CP} -p ${PREFIX}/etc/${FILE}.example ${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/=/%%!/} \ ${MSG_FILE} > ${PKGMESSAGE} -#@${REINPLACE_CMD} -e '/^%%LDAP%%/d' ${PKGMESSAGE} - @${ECHO_MSG} - @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} .include diff --git a/net/isc-dhcp43-server/pkg-plist b/net/isc-dhcp43-server/pkg-plist index c68d9fd7b1a8..1c8b406c3679 100644 --- a/net/isc-dhcp43-server/pkg-plist +++ b/net/isc-dhcp43-server/pkg-plist @@ -1,5 +1,5 @@ -@unexec if cmp -s %D/etc/dhcpd.conf.example %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi @unexec echo "You should stop the dhcpd and dhcpd6 daemons if you are permanently removing this port." +@unexec if cmp -s %D/etc/dhcpd.conf.example %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi etc/dhcpd.conf.example @exec if [ ! -f %D/etc/dhcpd.conf ] ; then cp -p %D/%F %B/dhcpd.conf; fi %%IPV6%%@unexec if cmp -s %D/etc/dhcpd6.conf.example %D/etc/dhcpd6.conf; then rm -f %D/etc/dhcpd6.conf; fi @@ -9,6 +9,14 @@ etc/dhcpd.conf.example sbin/dhcpd bin/omshell %%LDAP%%bin/dhcpd-conf-to-ldap +man/man1/omshell.1.gz +man/man3/dhcpctl.3.gz +man/man3/omapi.3.gz +man/man5/dhcpd.conf.5.gz +man/man5/dhcpd.leases.5.gz +man/man5/dhcp-eval.5.gz +man/man5/dhcp-options.5.gz +man/man8/dhcpd.8.gz include/dhcpctl.h include/isc-dhcp/dst.h include/omapip/alloc.h