diff options
author | eadler <eadler@FreeBSD.org> | 2011-08-30 07:17:16 +0800 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2011-08-30 07:17:16 +0800 |
commit | 348dcc4a433843c2fd94a939e84c0d0574bd28be (patch) | |
tree | 744a1fa515d92d8560771b89bf0a64b5a48aedb2 /shells/ambit | |
parent | 5c93abbe57af97b4460d114c475975b3fec33127 (diff) | |
download | freebsd-ports-gnome-348dcc4a433843c2fd94a939e84c0d0574bd28be.tar.gz freebsd-ports-gnome-348dcc4a433843c2fd94a939e84c0d0574bd28be.tar.zst freebsd-ports-gnome-348dcc4a433843c2fd94a939e84c0d0574bd28be.zip |
Ambit, at its simplest, uses Bash Brace Expansion to expand and list
hostnames OR commands. First and foremost Ambit is meant to be a general
purpose hostlist enumerator to be used by other applications or scripts.
Additionally Ambit can be used to manage User Specific as well as
System-Wide HostGroups. It can also be used to query Network HostGroups.
Finally, Ambit is able to detect when it is expanding a command (rather than
a host list), allowing for the command to be expanded and executed
synchronously. This means Ambit can expand and run just about anything on
the command line and usually works in places where Bash Brace Expansion
might fail.
WWW: http://m.a.tt/er/ambit/
PR: 159769
Submitted by: Sascha Klauder <sklauder@trimind.de>
Approved by: sahil (mentor)
Diffstat (limited to 'shells/ambit')
-rw-r--r-- | shells/ambit/Makefile | 47 | ||||
-rw-r--r-- | shells/ambit/distinfo | 2 | ||||
-rw-r--r-- | shells/ambit/pkg-descr | 12 | ||||
-rw-r--r-- | shells/ambit/pkg-plist | 10 |
4 files changed, 71 insertions, 0 deletions
diff --git a/shells/ambit/Makefile b/shells/ambit/Makefile new file mode 100644 index 000000000000..5c6d2d5f4d60 --- /dev/null +++ b/shells/ambit/Makefile @@ -0,0 +1,47 @@ +# New ports collection makefile for: ambit +# Date created: 2011-08-09 +# Whom: Sascha Klauder <sklauder@trimind.de> +# +# $FreeBSD$ +# + +PORTNAME= ambit +PORTVERSION= 2.0.39 +CATEGORIES= shells +MASTER_SITES= http://m.a.tt/er/ +DISTNAME= ${PORTNAME} +EXTRACT_SUFX= .tgz + +MAINTAINER= sklauder@trimind.de +COMMENT= Extended bash brace expansion to expand hostnames or commands + +LICENSE= GPLv3 + +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash + +AMBITDIR?= /var/spool/${PORTNAME} +MAN1= ${PORTNAME}.1 +MANCOMPRESSED= yes +NO_BUILD= yes +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +PLIST_SUB= AMBITDIR=${AMBITDIR} + +post-patch: + @${REINPLACE_CMD} \ + -e "s!/bin/bash!${LOCALBASE}/bin/bash!" \ + -e "s!/etc/.MyNameIs/!${PREFIX}/etc/!" \ + -e "s!/usr/lib/.MyNameIs/!${PREFIX}/lib/!" \ + -e "s!/var/.MyNameIs!${AMBITDIR}!" ${WRKSRC}/usr/bin/ambit + +do-install: + @${MKDIR} ${AMBITDIR}/hosts + ${INSTALL_SCRIPT} ${WRKSRC}/usr/bin/ambit ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/usr/lib/ambit/libambit.sh ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample + ${INSTALL_MAN} ${WRKSRC}/usr/share/man/man1/${PORTNAME}.1.gz ${MANPREFIX}/man/man1 + @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \ + ${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \ + fi + +.include <bsd.port.mk> diff --git a/shells/ambit/distinfo b/shells/ambit/distinfo new file mode 100644 index 000000000000..2ef665a9d98e --- /dev/null +++ b/shells/ambit/distinfo @@ -0,0 +1,2 @@ +SHA256 (ambit.tgz) = 9acade33debbdc4baf598a54cf0daa0400796a85d87fbfc1784a707d83d12c97 +SIZE (ambit.tgz) = 8729 diff --git a/shells/ambit/pkg-descr b/shells/ambit/pkg-descr new file mode 100644 index 000000000000..e9253c72cef5 --- /dev/null +++ b/shells/ambit/pkg-descr @@ -0,0 +1,12 @@ +Ambit, at its simplest, uses Bash Brace Expansion to expand and list +hostnames OR commands. First and foremost Ambit is meant to be a general +purpose hostlist enumerator to be used by other applications or scripts. +Additionally Ambit can be used to manage User Specific as well as +System-Wide HostGroups. It can also be used to query Network HostGroups. +Finally, Ambit is able to detect when it is expanding a command (rather than +a host list), allowing for the command to be expanded and executed +synchronously. This means Ambit can expand and run just about anything on +the command line and usually works in places where Bash Brace Expansion +might fail. + +WWW: http://m.a.tt/er/ambit/ diff --git a/shells/ambit/pkg-plist b/shells/ambit/pkg-plist new file mode 100644 index 000000000000..e5adb9ab1541 --- /dev/null +++ b/shells/ambit/pkg-plist @@ -0,0 +1,10 @@ +bin/ambit +lib/libambit.sh +@unexec if cmp -s %D/etc/ambit.conf.sample %D/etc/ambit.conf; then rm -f %D/etc/ambit.conf; fi +etc/ambit.conf.sample +@exec if [ ! -f %D/etc/ambit.conf ] ; then cp -p %D/%F %B/ambit.conf; fi +@exec mkdir -p %%AMBITDIR%%/hosts +@cwd / +@dirrmtry %%AMBITDIR%%/hosts +@dirrmtry %%AMBITDIR%% + |