49 lines
1 KiB
Bash
49 lines
1 KiB
Bash
# Copyright 1999-2020 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
inherit linux-info systemd
|
|
|
|
DESCRIPTION="B-Tree Vault, an automatic snapshot and backup tool for btrfs."
|
|
HOMEPAGE="https://git.decade.cz/decade-public/${PN}"
|
|
SRC_URI="https://git.decade.cz/decade-public/${PN}/archive/v${PV}.tar.gz -> ${PN}-v${PV}.tar.gz"
|
|
|
|
LICENSE="GPL-3"
|
|
SLOT="0"
|
|
KEYWORDS="*"
|
|
IUSE=""
|
|
|
|
RDEPEND="
|
|
>=dev-lang/python-3.8
|
|
sys-apps/systemd
|
|
sys-fs/btrfs-progs
|
|
app-arch/zstd
|
|
dev-libs/openssl
|
|
sys-apps/coreutils
|
|
app-crypt/hash-pipe
|
|
"
|
|
|
|
S="${WORKDIR}/${PN}"
|
|
|
|
pkg_pretend() {
|
|
if linux_config_exists; then
|
|
if ! linux_chkconfig_present BTRFS_FS; then
|
|
ewarn "You must enable CONFIG_BTRFS_FS before using this program."
|
|
fi
|
|
else
|
|
ewarn "Linux .config not found, unable to verify kernel configuration."
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
dosbin btv
|
|
|
|
systemd_dounit systemd/btv-backup.service
|
|
systemd_dounit systemd/btv-backup.timer
|
|
|
|
insinto /etc/btv
|
|
newins cfg/config.ini config.ini.example
|
|
insopts -m600
|
|
newins cfg/key key.example
|
|
}
|