diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-01 07:10:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-01 07:10:13 +0100 |
commit | 42ff81a7480d9bba317b42fcca03b46da2a622ce (patch) | |
tree | 5a0ccbe2b71a4ec6c160b568160999a6afe316de /sys-apps/etckeeper/etckeeper-1.18.18.ebuild | |
parent | 290844d409ace33d948956aec3c542ea6f4a7b13 (diff) |
gentoo auto-resync : 01:10:2022 - 07:10:12
Diffstat (limited to 'sys-apps/etckeeper/etckeeper-1.18.18.ebuild')
-rw-r--r-- | sys-apps/etckeeper/etckeeper-1.18.18.ebuild | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/sys-apps/etckeeper/etckeeper-1.18.18.ebuild b/sys-apps/etckeeper/etckeeper-1.18.18.ebuild new file mode 100644 index 000000000000..b63426712a0e --- /dev/null +++ b/sys-apps/etckeeper/etckeeper-1.18.18.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 prefix systemd tmpfiles + +DESCRIPTION="A collection of tools to let /etc be stored in a repository" +HOMEPAGE="https://etckeeper.branchable.com/" +SRC_URI="https://git.joeyh.name/index.cgi/etckeeper.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +SLOT="0" +IUSE="cron test" + +BDEPEND="test? ( + dev-util/bats + dev-vcs/git +)" + +RDEPEND="app-portage/portage-utils + cron? ( virtual/cron ) + || ( + dev-vcs/git + dev-vcs/mercurial + dev-vcs/darcs + ) +" + +RESTRICT="!test? ( test )" + +PATCHES=( + # TODO: submit upstream + "${FILESDIR}"/${PN}-1.18.18-gentoo.patch +) + +src_prepare() { + default + hprefixify *.d/* etckeeper + local systemdunitdir="$(systemd_get_systemunitdir)" + systemdunitdir="${systemdunitdir#${EPREFIX}}" + sed -i \ + -e s'@zsh/vendor-completions@zsh/site-functions@' \ + -e s"@/lib/systemd/system@"${systemdunitdir}"@" \ + Makefile || die + rm -v init.d/60darcs-deleted-symlinks || die +} + +src_compile() { + : +} + +src_install() { + emake DESTDIR="${ED}" install + + doenvd "$(prefixify_ro "${FILESDIR}"/99${PN})" + + newbashcomp bash_completion ${PN} + dodoc doc/README.mdwn + newdoc "${FILESDIR}"/bashrc-r1 bashrc.example + + rm -rv "${ED}/var/cache" || die + newtmpfiles "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf + + if use cron ; then + exeinto /etc/cron.daily + newexe - etckeeper <<'_EOF_' +#!/bin/sh +set -e +if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then + . /etc/etckeeper/etckeeper.conf + if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then + /etc/etckeeper/daily + fi +fi +_EOF_ + fi + + local conf_update_dir="/etc/portage/conf-update.d" + insinto "${conf_update_dir}" + newins "${FILESDIR}/${PN}-conf-update-hook" "${PN}" + fperms 755 "${conf_update_dir}/${PN}" +} + +pkg_postinst() { + tmpfiles_process "${PN}.conf" + + elog "${PN} supports git, mercurial and darcs" + elog "This ebuild just ensures at least one is installed!" + elog + elog "You may want to adjust your /etc/portage/bashrc" + elog "see the example file in /usr/share/doc/${PF}" + elog + elog "To initialise your etc-dir as a repository run:" + elog "${PN} init -d /etc" +} |