summaryrefslogtreecommitdiff
blob: 4cf72e6606ef175fc89aa7108e1de54604f95bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

# See https://github.com/github/backup-utils/issues/135
PYTHON_COMPAT=(python2_7)
inherit python-any-r1

DESCRIPTION="Backup and recovery utilities for GitHub Enterprise"
HOMEPAGE="https://github.com/github/backup-utils"
SRC_URI="https://github.com/github/backup-utils/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"

DEPEND="test? (
	dev-util/checkbashisms
	${PYTHON_DEPS}
)"

RDEPEND="net-misc/rsync"

MY_PN="${PN/#github-/}"
S="${WORKDIR}/${MY_PN}-${PV}"

src_prepare() {
	default

	# skip a test that depends on a git checkout: https://bugs.gentoo.org/629628
	eapply "${FILESDIR}/github-backup-utils-tarball-fix.patch"

	# Fix for python3 systems
	eapply "${FILESDIR}/github-backup-utils-python27.patch"
}

src_compile() {
	:;
}

src_install() {
	dobin bin/*
	insinto usr/share/${PN}
	doins share/${PN}/version

	exeinto usr/share/${PN}
	doexe share/${PN}/bm.sh
	doexe share/${PN}/ghe-*

	insinto etc/${PN}
	newins backup.config-example backup.config
}

src_test() {
	emake test
}