From 427a034f7f95631b993b6302e179852d79c229ab Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 8 Dec 2012 19:53:24 -0600 Subject: [PATCH] misc-cdn/bash-config: revbump and new port options framework --- cdn/ports/misc-cdn/bash-config/Makefile | 38 ++++++++++++++++++------- cdn/ports/misc-cdn/bash-config/distinfo | 2 ++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/cdn/ports/misc-cdn/bash-config/Makefile b/cdn/ports/misc-cdn/bash-config/Makefile index 5a4cdea..7417f3e 100644 --- a/cdn/ports/misc-cdn/bash-config/Makefile +++ b/cdn/ports/misc-cdn/bash-config/Makefile @@ -6,8 +6,7 @@ # PORTNAME= bash-config -PORTVERSION= 1.0.8 -PORTREVISION= 1 +PORTVERSION= 1.0.9 CATEGORIES= misc-cdn MASTER_SITES= http://git.cyberleo.net/releases/${PORTNAME}/ EXTRACT_SUFX= .tgz @@ -19,7 +18,9 @@ VALID_CATEGORIES += misc-cdn NO_BUILD= yes -OPTIONS= COMPLETION "Use bash-completion for zfs command completion" on +OPTIONS_DEFINE= BASHCOMP +BASHCOMP_DESC= Install bash-completion scripts & depends +OPTIONS_DEFAULT=BASHCOMP PLIST_FILES= etc/bash-config/virgin \ etc/bash-config/common \ @@ -47,13 +48,27 @@ PLIST_DIRS= share/bash-config \ etc/bash-config/bash_profile.d \ etc/bash-config -.include +RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash -.if defined(WITH_COMPLETION) -RUN_DEPENDS+= ${LOCALBASE}/etc/bash_completion.d:${PORTSDIR}/shells/bash-completion -PLIST_FILES+= etc/bash_completion.d/zfs +.include + +.if ${PORT_OPTIONS:MBASHCOMP} +RUN_DEPENDS+= ${LOCALBASE}/share/bash-completion/bash_completion.sh:${PORTSDIR}/shells/bash-completion + +PLIST_FILES+= share/bash-completion/completions/service \ + share/bash-completion/completions/zfs .endif +post-patch: + ${REINPLACE_CMD} -i '' -e 's|/usr/local/|${PREFIX}/|g' \ + ${WRKSRC}/bash-config/common \ + ${WRKSRC}/bash-config/bash_profile \ + ${WRKSRC}/bash-config/bash_profile.d/* \ + ${WRKSRC}/bash-config/bashrc \ + ${WRKSRC}/bash-config/bashrc.d/* \ + ${WRKSRC}/share/fixskel \ + ${WRKSRC}/share/fixuser + do-install: ${MKDIR} ${PREFIX}/etc/bash-config ${INSTALL_SCRIPT} ${WRKSRC}/bash-config/virgin ${PREFIX}/etc/bash-config @@ -68,9 +83,10 @@ do-install: ${INSTALL_SCRIPT} ${WRKSRC}/share/fixskel ${PREFIX}/share/bash-config ${REINPLACE_CMD} -e "s@/usr/local/etc/bash-config/@${PREFIX}/etc/bash-config/@g" ${WRKSRC}/share/fixuser ${INSTALL_SCRIPT} ${WRKSRC}/share/fixuser ${PREFIX}/share/bash-config -.if defined(WITH_COMPLETION) - ${MKDIR} ${PREFIX}/etc/bash_completion.d - ${INSTALL_DATA} ${WRKSRC}/bash_completion.d/zfs ${PREFIX}/etc/bash_completion.d +.if ${PORT_OPTIONS:MBASHCOMP} + ${MKDIR} ${PREFIX}/share/bash-completion/completions + ${INSTALL_DATA} ${WRKSRC}/bash-completions/service ${PREFIX}/share/bash-completion/completions + ${INSTALL_DATA} ${WRKSRC}/bash-completions/zfs ${PREFIX}/share/bash-completion/completions .endif -.include +.include diff --git a/cdn/ports/misc-cdn/bash-config/distinfo b/cdn/ports/misc-cdn/bash-config/distinfo index 834f7eb..908724c 100644 --- a/cdn/ports/misc-cdn/bash-config/distinfo +++ b/cdn/ports/misc-cdn/bash-config/distinfo @@ -14,3 +14,5 @@ SHA256 (bash-config-1.0.7.tgz) = 918710c76abd7be082abcaacbf459163a5d2279da602e99 SIZE (bash-config-1.0.7.tgz) = 7519 SHA256 (bash-config-1.0.8.tgz) = fa232f54a91c0c19039dddaa00c1f8237f559724f77b14860fabba6f1198f9a1 SIZE (bash-config-1.0.8.tgz) = 7559 +SHA256 (bash-config-1.0.9.tgz) = 043de262cddae5dfc72b38817d9a227ed25c9707c7b2ff5fb6162c9d15559d18 +SIZE (bash-config-1.0.9.tgz) = 7780 -- 2.42.0