2021-07-07 18:20:27 +02:00
|
|
|
# Copyright 1999-2021 Gentoo Authors
|
2020-02-17 18:16:09 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
PYTHON_COMPAT=( python3_{6,7,8} )
|
|
|
|
|
|
|
|
inherit bash-completion-r1 python-r1
|
|
|
|
|
|
|
|
DESCRIPTION="DuckDuckGo from the terminal"
|
|
|
|
HOMEPAGE="https://github.com/jarun/ddgr"
|
|
|
|
|
2020-03-15 13:18:05 +01:00
|
|
|
if [[ "${PV}" == *9999* ]]; then
|
2020-02-17 18:16:09 +01:00
|
|
|
inherit git-r3
|
2020-03-15 13:18:05 +01:00
|
|
|
EGIT_REPO_URI="https://github.com/jarun/${PN}.git"
|
2020-02-17 18:16:09 +01:00
|
|
|
else
|
2020-03-15 13:18:05 +01:00
|
|
|
SRC_URI="https://github.com/jarun/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
2020-02-17 18:16:09 +01:00
|
|
|
KEYWORDS="~amd64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
RESTRICT="mirror"
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
IUSE="bash-completion fish-completion zsh-completion"
|
|
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
|
|
|
|
|
|
DEPEND="
|
|
|
|
${PYTHON_DEPS}
|
|
|
|
"
|
|
|
|
RDEPEND="
|
|
|
|
${DEPEND}
|
|
|
|
"
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
exeinto "/usr/bin"
|
|
|
|
doexe "${PN}"
|
|
|
|
doman "${PN}.1"
|
|
|
|
dodoc CHANGELOG README.md
|
|
|
|
if use bash-completion
|
|
|
|
then
|
|
|
|
newbashcomp auto-completion/bash/${PN}-completion.bash ${PN}
|
|
|
|
fi
|
|
|
|
if use fish-completion
|
|
|
|
then
|
|
|
|
insinto /usr/share/fish/vendor_completions.d/
|
|
|
|
doins auto-completion/fish/${PN}.fish
|
|
|
|
fi
|
|
|
|
if use zsh-completion
|
|
|
|
then
|
|
|
|
insinto /usr/share/zsh/site-functions
|
|
|
|
doins auto-completion/zsh/_${PN}
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|