*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / app-admin / github-backup-utils / github-backup-utils-2.11.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 # See https://github.com/github/backup-utils/issues/135
7 PYTHON_COMPAT=(python2_7)
8 inherit python-any-r1
9
10 DESCRIPTION="Backup and recovery utilities for GitHub Enterprise"
11 HOMEPAGE="https://github.com/github/backup-utils"
12 SRC_URI="https://github.com/github/backup-utils/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 DEPEND="test? (
21         dev-util/checkbashisms
22         sys-apps/moreutils
23         ${PYTHON_DEPS}
24 )"
25
26 RDEPEND="net-misc/rsync"
27
28 MY_PN="${PN/#github-/}"
29 S="${WORKDIR}/${MY_PN}-${PV}"
30
31 src_prepare() {
32         default
33
34         # skip a test that depends on a git checkout: https://bugs.gentoo.org/629628
35         eapply "${FILESDIR}/github-backup-utils-tarball-fix.patch"
36
37         # Fix for python3 systems
38         eapply "${FILESDIR}/github-backup-utils-python27.patch"
39 }
40
41 src_compile() {
42         :;
43 }
44
45 src_install() {
46         dobin bin/*
47         insinto usr/share/${PN}
48         doins share/${PN}/version
49
50         exeinto usr/share/${PN}
51         doexe share/${PN}/bm.sh
52         doexe share/${PN}/ghe-*
53
54         insinto etc/${PN}
55         newins backup.config-example backup.config
56 }
57
58 src_test() {
59         emake test
60 }