blob: 5f0c5c0f44634a1dc4e6d9a698062397fd9b8f6e (
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
|
# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit optfeature readme.gentoo-r1
DESCRIPTION="Automatically creates a timeshift-snapshot when executed"
HOMEPAGE="https://gitlab.com/gobonja/timeshift-autosnap"
SRC_URI="https://gitlab.com/gobonja/timeshift-autosnap/-/archive/${PV}/${P}.tar.bz2"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="app-backup/timeshift"
PATCHES=( "${FILESDIR}/${PN}-remove-arch-specific.patch" )
bashrc=/etc/portage/bashrc
DISABLE_AUTOFORMATTING=1
DOC_CONTENTS="to run timeshift-autosnap everytime you emerge a package run:
# touch ${bashrc}
# grep -q '#!/bin/' ${bashrc} || awk -i inplace 'BEGINFILE{print '#!/bin/sh'}{print}' ${bashrc}
# grep -q timeshift-autosnap ${bashrc} || echo '
function pre_pkg_setup() {
/usr/bin/timeshift-autosnap ;
}' >> ${bashrc}"
src_install(){
dobin timeshift-autosnap
insinto /etc
doins timeshift-autosnap.conf
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
optfeature "grub-btrfs snapshot support" app-backup/grub-btrfs
}
|