diff options
author | Craig Andrews <candrews@gentoo.org> | 2019-03-25 11:25:53 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2019-03-25 11:26:39 -0400 |
commit | 2c018f15ba322ef3d927b011bdfa72652ac30a5a (patch) | |
tree | 5e0906609aaf0601eb8396247c8de3c8af08b5c4 /app-backup/btrbk | |
parent | app-misc/tmux: Removed redundant S variable in live ebuild. (diff) | |
download | gentoo-2c018f15ba322ef3d927b011bdfa72652ac30a5a.tar.gz gentoo-2c018f15ba322ef3d927b011bdfa72652ac30a5a.tar.bz2 gentoo-2c018f15ba322ef3d927b011bdfa72652ac30a5a.zip |
app-backup/btrbk: add USE=doc
Closes: https://bugs.gentoo.org/681056
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'app-backup/btrbk')
-rw-r--r-- | app-backup/btrbk/btrbk-0.27.1-r1.ebuild | 72 | ||||
-rw-r--r-- | app-backup/btrbk/btrbk-9999.ebuild | 14 |
2 files changed, 81 insertions, 5 deletions
diff --git a/app-backup/btrbk/btrbk-0.27.1-r1.ebuild b/app-backup/btrbk/btrbk-0.27.1-r1.ebuild new file mode 100644 index 000000000000..e0800b810e05 --- /dev/null +++ b/app-backup/btrbk/btrbk-0.27.1-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/digint/btrbk.git" + inherit git-r3 + SRC_URI="" + KEYWORDS="" +else + SRC_URI="https://digint.ch/download/btrbk/releases/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +DESCRIPTION="Tool for creating snapshots and remote backups of btrfs subvolumes" +HOMEPAGE="https://digint.ch/btrbk/" +LICENSE="GPL-3+" +SLOT="0" +IUSE="+pv +doc" + +DEPEND="doc? ( >=dev-ruby/asciidoctor-1.5.7 )" + +RDEPEND="dev-lang/perl + net-misc/openssh + pv? ( sys-apps/pv ) + >=sys-fs/btrfs-progs-3.18.2" + +src_compile() { + use doc && emake -C doc +} +src_install() { + local targets="install-bin install-etc install-share install-systemd" + use doc && targets="${targets} install-man install-doc" + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" SYSTEMDDIR="$(systemd_get_systemunitdir)" ${targets} +} +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-0.26.0" ; then + upgrade_0_26_0_warning="1" + fi + if has_version "<${CATEGORY}/${PN}-0.27.0" ; then + upgrade_0_27_0_warning="1" + fi +} +pkg_postinst() { + if [[ "${upgrade_0_26_0_warning}" == "1" ]]; then + ewarn "If you are using raw targets, make sure to run the" + ewarn "\"raw_suffix2sidecar\" utility in each target directory." + fi + if [[ "${upgrade_0_27_0_warning}" == "1" ]]; then + ewarn 'Due to a bugfix in the scheduler [1] [2], previously preserved' + ewarn 'monthly/yearly backups could get deleted when upgrading to' + ewarn 'btrbk-0.27.0.' + ewarn '' + ewarn 'Before upgrading to btrbk-0.27.0, make sure to stop all cron jobs' + ewarn 'or systemd timers calling btrbk.' + ewarn '' + ewarn 'After upgrading, run "btrbk prune --dry-run --print-schedule" and' + ewarn 'check if any snapshots/backups would get deleted. If you want to' + ewarn 'forcibly preserve a snapshot/backup forever, rename it:' + ewarn '' + ewarn ' mv mysubvol.YYYYMMDD mysubvol.YYYYMMDD.keep_forever' + ewarn '' + ewarn 'Note that btrbk ignores subvolumes with unknown naming scheme, e.g.' + ewarn '(".keep_forever" suffix in the example above).' + ewarn '' + ewarn ' [1] https://github.com/digint/btrbk/issues/217' + ewarn ' [2] https://github.com/digint/btrbk/commit/719fb5f' + fi +} diff --git a/app-backup/btrbk/btrbk-9999.ebuild b/app-backup/btrbk/btrbk-9999.ebuild index f364036c572c..e0800b810e05 100644 --- a/app-backup/btrbk/btrbk-9999.ebuild +++ b/app-backup/btrbk/btrbk-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -19,18 +19,22 @@ DESCRIPTION="Tool for creating snapshots and remote backups of btrfs subvolumes" HOMEPAGE="https://digint.ch/btrbk/" LICENSE="GPL-3+" SLOT="0" -IUSE="+pv" +IUSE="+pv +doc" -DEPEND=">=app-text/asciidoc-8.6.0 - app-text/xmlto" +DEPEND="doc? ( >=dev-ruby/asciidoctor-1.5.7 )" RDEPEND="dev-lang/perl net-misc/openssh pv? ( sys-apps/pv ) >=sys-fs/btrfs-progs-3.18.2" +src_compile() { + use doc && emake -C doc +} src_install() { - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" SYSTEMDDIR="$(systemd_get_systemunitdir)" install + local targets="install-bin install-etc install-share install-systemd" + use doc && targets="${targets} install-man install-doc" + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" SYSTEMDDIR="$(systemd_get_systemunitdir)" ${targets} } pkg_preinst() { if has_version "<${CATEGORY}/${PN}-0.26.0" ; then |