Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2829184 to your computer and use it in GitHub Desktop.
Save anonymous/2829184 to your computer and use it in GitHub Desktop.
/home/moschlar/src/gentoo/portage/dev-vcs/git-flow/git-flow-0.4.1.ebuild
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit bash-completion-r1
DESCRIPTION="Git extensions to provide high-level repository operations for Vincent Driessen's branching model."
HOMEPAGE="https://github.com/nvie/gitflow"
SRC_URI="https://github.com/nvie/gitflow/tarball/0.4.1 -> ${P}.tar.gz
bash-completion? ( https://github.com/bobthecow/git-flow-completion/tarball/0.4.1.0 -> ${P}-completion.tar.gz )"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE="bash-completion"
DEPEND="dev-util/shflags"
RDEPEND="${DEPEND}
dev-vcs/git[bash-completion?]"
S="${WORKDIR}/nvie-gitflow-5b26edc"
S2="${WORKDIR}/bobthecow-git-flow-completion-b399150"
src_prepare() {
# Fix included shFlags file
rm gitflow-shFlags
ln -s ${ROOT}/usr/share/misc/shflags gitflow-shFlags
}
src_compile() {
true
}
src_install() {
emake prefix=${D} install || die "install failed"
if use bash-completion; then
newbashcomp ${S2}/git-flow-completion.bash git-flow
fi
}
pkg_postinst() {
if use bash-completion; then
echo "Use eselect to activate the bash-completion module:"
echo " git-flow"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment