1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 EGIT_REPO_URI="https://github.com/openSUSE/${PN}.git"
8 PYTHON_COMPAT=( python2_7 )
11 if [[ "${PV}" == "9999" ]]; then
14 OBS_PROJECT="openSUSE:Tools"
15 EXTRA_ECLASS="obs-download"
18 DISTUTILS_SINGLE_IMPL=1
19 inherit distutils-r1 ${EXTRA_ECLASS}
22 DESCRIPTION="Command line tool for Open Build Service"
23 HOMEPAGE="https://en.opensuse.org/openSUSE:OSC"
25 [[ "${PV}" == "9999" ]] || SRC_URI="${OBS_URI}/${P}.tar.gz"
31 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
32 [[ "${PV}" == "9999" ]] || \
33 KEYWORDS="~amd64 ~x86"
36 dev-python/urlgrabber[${PYTHON_USEDEP}]
37 app-arch/rpm[python,${PYTHON_USEDEP}]
38 dev-python/m2crypto[${PYTHON_USEDEP}]
43 dev-util/obs-service-meta
46 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
49 epatch "${FILESDIR}"/${PN}-0.139.2-out-of-tree-build.patch
50 distutils-r1_src_prepare
54 distutils-r1_src_install
55 dosym osc-wrapper.py /usr/bin/osc
56 keepdir /usr/lib/osc/source_validators
58 find . -type f -exec sed -i 's|/usr/bin/build|/usr/bin/suse-build|g' {} +
59 find . -type f -exec sed -i 's|/usr/lib/build|/usr/libexec/suse-build|g' {} +
60 find . -type f -exec sed -i 's|/usr/lib/obs|/usr/libexec/obs|g' {} +
61 rm -f "${ED}"/usr/share/doc/${PN}*/TODO*