media-plugins/vdr-freecell: missing die's added
[gentoo.git] / dev-util / osc / osc-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 EGIT_REPO_URI="https://github.com/openSUSE/${PN}.git"
7
8 PYTHON_COMPAT=( python2_7 )
9 PYTHON_REQ_USE="xml"
10
11 if [[ "${PV}" == "9999" ]]; then
12         EXTRA_ECLASS="git-r3"
13 else
14         OBS_PROJECT="openSUSE:Tools"
15         EXTRA_ECLASS="obs-download"
16 fi
17
18 DISTUTILS_SINGLE_IMPL=1
19 inherit distutils-r1 ${EXTRA_ECLASS}
20 unset EXTRA_ECLASS
21
22 DESCRIPTION="Command line tool for Open Build Service"
23 HOMEPAGE="https://en.opensuse.org/openSUSE:OSC"
24
25 [[ "${PV}" == "9999" ]] || SRC_URI="${OBS_URI}/${P}.tar.gz"
26
27 LICENSE="GPL-2"
28 SLOT="0"
29 IUSE=""
30
31 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
32 [[ "${PV}" == "9999" ]] || \
33 KEYWORDS="~amd64 ~x86"
34
35 DEPEND="
36         dev-python/urlgrabber[${PYTHON_USEDEP}]
37         app-arch/rpm[python,${PYTHON_USEDEP}]
38         dev-python/m2crypto[${PYTHON_USEDEP}]
39         ${PYTHON_DEPS}
40 "
41 PDEPEND="${DEPEND}
42         app-admin/sudo
43         dev-util/obs-service-meta
44 "
45
46 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
47
48 src_prepare() {
49         epatch "${FILESDIR}"/${PN}-0.139.2-out-of-tree-build.patch
50         distutils-r1_src_prepare
51 }
52
53 src_install() {
54         distutils-r1_src_install
55         dosym osc-wrapper.py /usr/bin/osc
56         keepdir /usr/lib/osc/source_validators
57         cd "${ED}"/usr/
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*
62 }