forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marek Szuba <[email protected]>
- Loading branch information
Marek Szuba
committed
Oct 12, 2021
1 parent
4ac7b44
commit 0ab3490
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST borgmatic-1.5.18.tar.gz 277064 BLAKE2B 43f5f8d2fb7f13ed6bcfd5b00f99a797f214f5220b27f8c173f636d37b4c0b5c8d1915a73684597d71fb436717a84de542be51a9b23f735e304e15427d40ace1 SHA512 2e008ef01922851a3fd5c7b5d1ad30d5b0e007e5f76af4849159ff2f730add591ffb30ba3d867b0e7221b98e949e4cf3e11b8853a3412395a63c135248761264 | ||
DIST borgmatic-1.5.20.tar.gz 277495 BLAKE2B 6714b132549633b1d24e3c0bd7cd16ee9ff5510c4915d4115d62f4a260dc3cc505a02d8a14220184d53c934384d9ca092a38d6deebcefb843e7ba4492043819a SHA512 ea370ea1e57f56c8c4b7636695ae40473b9d58696948f55afde55b31b3bcbd68923952e80b0ef0bc40f68bb265ccd47bd5e0b2735ee9b4b6f3418a5ff13eaaf4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{8..10} ) | ||
DISTUTILS_SINGLE_IMPL=1 | ||
DISTUTILS_USE_SETUPTOOLS="rdepend" | ||
|
||
inherit distutils-r1 systemd | ||
|
||
DESCRIPTION="Automatically create, prune and verify backups with borgbackup" | ||
HOMEPAGE="https://torsion.org/borgmatic/" | ||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" | ||
|
||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~riscv" | ||
|
||
# borg is called as an external tool, hence no pythonic stuff | ||
RDEPEND="app-backup/borgbackup | ||
$(python_gen_cond_dep ' | ||
dev-python/colorama[${PYTHON_USEDEP}] | ||
dev-python/jsonschema[${PYTHON_USEDEP}] | ||
dev-python/requests[${PYTHON_USEDEP}] | ||
<dev-python/ruamel-yaml-0.18.0[${PYTHON_USEDEP}] | ||
')" | ||
BDEPEND=" | ||
test? ( | ||
$(python_gen_cond_dep ' | ||
>=dev-python/flexmock-0.10.10[${PYTHON_USEDEP}] | ||
') | ||
)" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-1.5.1-no_test_coverage.patch | ||
"${FILESDIR}"/${PN}-1.5.16-systemd_service_bin_path.patch | ||
) | ||
|
||
distutils_enable_tests pytest | ||
|
||
src_prepare() { | ||
distutils-r1_src_prepare | ||
|
||
# Unlike the other two test files in integration/commands, which use the | ||
# relevant modules' respective APIs, test_borgmatic.py tries to call the | ||
# 'borgmatic' executable - which by the time we execute src_test will | ||
# not have been created yet. Adding --install to distutils_enable_tests would | ||
# likely take care of this - but between the aforementioned behaviour | ||
# inconsistency and the fact the only test run from this file as of version | ||
# 1.5.13 is the parsing of contents of 'borgmatic --version', just skip it. | ||
rm -f "${S}"/tests/integration/commands/test_borgmatic.py | ||
} | ||
|
||
src_install() { | ||
distutils-r1_src_install | ||
systemd_dounit sample/systemd/borgmatic.{service,timer} | ||
keepdir /etc/borgmatic | ||
} | ||
|
||
pkg_postinst() { | ||
if [[ -z "${REPLACING_VERSIONS}" ]]; then | ||
elog "To generate a sample configuration file, run:" | ||
elog " generate-borgmatic-config" | ||
fi | ||
elog | ||
elog "Systemd users wishing to periodically run borgmatic can use the provided timer and service units." | ||
} |