From 8d7e24e76ed5df25e8399d172ae563007a2764b6 Mon Sep 17 00:00:00 2001 From: Yen-Ming Lee Date: Fri, 11 Jul 2014 18:11:18 +0000 Subject: [PATCH] - support stage --- dns/dnrd/Makefile | 45 ++++++++++++++++++----------------- dns/dnrd/files/pkg-install.in | 2 +- dns/dnrd/pkg-plist | 14 +---------- 3 files changed, 25 insertions(+), 36 deletions(-) diff --git a/dns/dnrd/Makefile b/dns/dnrd/Makefile index 3e0a860b36de..9c799018bd67 100644 --- a/dns/dnrd/Makefile +++ b/dns/dnrd/Makefile @@ -1,25 +1,25 @@ # Created by: George Reid # $FreeBSD$ -PORTNAME= dnrd -PORTVERSION= 2.20.3 -CATEGORIES= dns -MASTER_SITES= SF +PORTNAME= dnrd +PORTVERSION= 2.20.3 +CATEGORIES= dns +MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org -COMMENT= Proxy DNS daemon +COMMENT= Proxy DNS daemon + +LICENSE= GPLv2 USES= gmake -USE_RC_SUBR= ${PORTNAME} -GNU_CONFIGURE= yes +USE_RC_SUBR= ${PORTNAME} +GNU_CONFIGURE= yes -MAN8= dnrd.8 -DOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README -EXAMPLES= README-cache README-cygwin README-master TODO \ - master.sample +PORTDOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README +PORTEXAMPLES= README-cache README-cygwin README-master TODO master.sample -OPTIONS_DEFINE= TCP MASTER DEBUG RANDOM DOCS -OPTIONS_DEFAULT= MASTER +OPTIONS_DEFINE= TCP MASTER DEBUG RANDOM DOCS EXAMPLES +OPTIONS_DEFAULT=MASTER TCP_DESC= TCP support MASTER_DESC= Master file support RANDOM_DESC= Random source port @@ -31,7 +31,6 @@ DNRD_DIR?= ${ETCDIR} SUB_FILES= pkg-install SUB_LIST+= DNRD_DIR=${DNRD_DIR} -NO_STAGE= yes .include .if ${PORT_OPTIONS:MTCP} @@ -52,15 +51,17 @@ CONFIGURE_ARGS+= --enable-random-src do-install: @${ECHO} "==> Creating dnrd directory" - @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${INSTALL_PROGRAM} ${WRKSRC}/src/dnrd ${PREFIX}/sbin/ - @${INSTALL_MAN} ${WRKSRC}/doc/dnrd.8 ${MAN8PREFIX}/man/man8/ - @${INSTALL_DATA} ${WRKSRC}/doc/master.sample ${ETCDIR}/ + @${SETENV} DESTDIR="${STAGEDIR}" PKG_PREFIX="${STAGEDIR}${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${INSTALL_PROGRAM} ${WRKSRC}/src/dnrd ${STAGEDIR}${PREFIX}/sbin/ + @${INSTALL_MAN} ${WRKSRC}/doc/dnrd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/ + @${INSTALL_DATA} ${WRKSRC}/doc/master.sample ${STAGEDIR}${ETCDIR}/ .if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ - @${MKDIR} ${EXAMPLESDIR} - @${INSTALL_DATA} ${EXAMPLES:S,^,${WRKSRC}/doc/,} ${EXAMPLESDIR}/ + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ +.endif +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + @${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${EXAMPLESDIR}/ .endif .include diff --git a/dns/dnrd/files/pkg-install.in b/dns/dnrd/files/pkg-install.in index 98bd6bee13c7..7aad7cb1cfd4 100644 --- a/dns/dnrd/files/pkg-install.in +++ b/dns/dnrd/files/pkg-install.in @@ -19,7 +19,7 @@ PRE-INSTALL) ;; POST-INSTALL) if [ ! -d ${DNRD_DIR} ]; then - ${MKDIR} ${DNRD_DIR} + ${MKDIR} ${DESTDIR}${DNRD_DIR} fi ;; esac diff --git a/dns/dnrd/pkg-plist b/dns/dnrd/pkg-plist index 3d57df621605..c9b0bc983472 100644 --- a/dns/dnrd/pkg-plist +++ b/dns/dnrd/pkg-plist @@ -1,18 +1,6 @@ sbin/dnrd %%ETCDIR%%/master.sample -%%PORTDOCS%%%%DOCSDIR%%/AUTHORS -%%PORTDOCS%%%%DOCSDIR%%/COPYING -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog -%%PORTDOCS%%%%DOCSDIR%%/INSTALL -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%EXAMPLESDIR%%/README-cache -%%PORTDOCS%%%%EXAMPLESDIR%%/README-cygwin -%%PORTDOCS%%%%EXAMPLESDIR%%/README-master -%%PORTDOCS%%%%EXAMPLESDIR%%/TODO -%%PORTDOCS%%%%EXAMPLESDIR%%/master.sample -%%PORTDOCS%%@dirrm %%DOCSDIR%% -%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% +man/man8/dnrd.8.gz @dirrm %%ETCDIR%% @unexec echo "" @unexec echo "If you are permanently removing dnrd, remove user/group 'dnrd'" | /usr/bin/fmt