aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2020-12-26 21:31:21 +0100
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2020-12-26 21:33:10 +0100
commit86d6663954ac1affe897e4c444a4ff509a3d9d43 (patch)
tree7cced9d4b746e7f434a1c40bcf119542c7422cc6
parentapp-misc/cheat: fixes (diff)
downloadguru-86d6663954ac1affe897e4c444a4ff509a3d9d43.tar.gz
guru-86d6663954ac1affe897e4c444a4ff509a3d9d43.tar.bz2
guru-86d6663954ac1affe897e4c444a4ff509a3d9d43.zip
dev-util/osc: install fish comp, use eclass for bashcomp
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r--dev-util/osc/osc-0.171.0-r1.ebuild66
-rw-r--r--dev-util/osc/osc-9999.ebuild9
2 files changed, 71 insertions, 4 deletions
diff --git a/dev-util/osc/osc-0.171.0-r1.ebuild b/dev-util/osc/osc-0.171.0-r1.ebuild
new file mode 100644
index 000000000..02af4e71b
--- /dev/null
+++ b/dev-util/osc/osc-0.171.0-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="xml"
+DISTUTILS_SINGLE_IMPL=1
+
+inherit bash-completion-r1 distutils-r1
+
+DESCRIPTION="Command line tool for Open Build Service"
+HOMEPAGE="
+ https://en.opensuse.org/openSUSE:OSC
+ https://github.com/openSUSE/osc
+"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openSUSE/${PN}.git"
+else
+ OBS_PROJECT="openSUSE:Tools"
+ SRC_URI="https://github.com/openSUSE/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+# Test require config file: osc.oscerr.NoConfigfile
+RESTRICT="test"
+
+RDEPEND="
+ app-arch/rpm[python,${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/m2crypto[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_SINGLE_DEPS}
+"
+BDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
+ ')
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ dev-python/path-py[${PYTHON_USEDEP}]
+ ')
+)"
+
+distutils_enable_tests pytest
+# Bug: https://bugs.gentoo.org/704520
+#distutils_enable_sphinx docs dev-python/alabaster
+
+src_install() {
+ distutils-r1_src_install
+
+ dosym osc-wrapper.py /usr/bin/osc
+ rm -f "${ED}/usr/share/doc/${PN}"*/TODO* || die
+ newbashcomp dist/complete.sh "${PN}"
+ insinto /usr/lib/osc
+ newins dist/osc.complete complete
+ insinto /usr/share/zsh/site-functions
+ newins "${FILESDIR}/osc.zsh_completion" _osc
+ insinto /usr/share/fish/vendor_completions.d
+ doins osc.fish
+}
diff --git a/dev-util/osc/osc-9999.ebuild b/dev-util/osc/osc-9999.ebuild
index 7969127ae..02af4e71b 100644
--- a/dev-util/osc/osc-9999.ebuild
+++ b/dev-util/osc/osc-9999.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE="xml"
DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1
+inherit bash-completion-r1 distutils-r1
DESCRIPTION="Command line tool for Open Build Service"
HOMEPAGE="
@@ -55,11 +55,12 @@ src_install() {
distutils-r1_src_install
dosym osc-wrapper.py /usr/bin/osc
- rm -f "${ED}/usr/share/doc/${PN}"*/TODO*
- insinto /usr/share/bash-completion/completions
- newins dist/complete.sh osc
+ rm -f "${ED}/usr/share/doc/${PN}"*/TODO* || die
+ newbashcomp dist/complete.sh "${PN}"
insinto /usr/lib/osc
newins dist/osc.complete complete
insinto /usr/share/zsh/site-functions
newins "${FILESDIR}/osc.zsh_completion" _osc
+ insinto /usr/share/fish/vendor_completions.d
+ doins osc.fish
}