1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

Support STAGE

This commit is contained in:
Renato Botelho 2014-03-26 17:27:24 +00:00
parent 9fa06126e0
commit ed7127a511
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349269
18 changed files with 110 additions and 149 deletions

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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 <bsd.port.options.mk>
.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 <bsd.port.mk>

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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 <bsd.port.options.mk>
.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 <bsd.port.mk>

View File

@ -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