blob: 91834c4b91a6342bb237b4c110c937b6576a3cb3 (
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
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
inherit python-single-r1
DESCRIPTION="Rollback to a snapper btrfs snapshot using the flat subvolume layout"
HOMEPAGE="https://github.com/jrabinow/snapper-rollback"
SRC_URI="https://github.com/jrabinow/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/btrfsutil[${PYTHON_USEDEP}]
')
app-backup/snapper
"
src_prepare() {
default
# python_fix_shebang cannot parse "env -S python3", so drop the -S flag.
sed -i -e '1s|/usr/bin/env -S python3|/usr/bin/env python3|' "${PN}.py" || die
}
src_install() {
newsbin "${PN}.py" "${PN}"
python_fix_shebang "${ED}/usr/sbin/${PN}"
insinto /etc
doins "${PN}.conf"
einstalldocs
}
|