summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-11-30 03:06:18 +0000
committerSam James <sam@gentoo.org>2023-11-30 03:06:18 +0000
commit38084763e167119b47e9c88711c82532055a9d77 (patch)
tree281e182f89188d6a8f1475aded3b72c345a51d44 /sys-apps/etckeeper
parentmedia-gfx/inkscape: add 1.3.2 (diff)
downloadgentoo-38084763e167119b47e9c88711c82532055a9d77.tar.gz
gentoo-38084763e167119b47e9c88711c82532055a9d77.tar.bz2
gentoo-38084763e167119b47e9c88711c82532055a9d77.zip
sys-apps/etckeeper: add 1.18.21
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/etckeeper')
-rw-r--r--sys-apps/etckeeper/Manifest1
-rw-r--r--sys-apps/etckeeper/etckeeper-1.18.21.ebuild100
2 files changed, 101 insertions, 0 deletions
diff --git a/sys-apps/etckeeper/Manifest b/sys-apps/etckeeper/Manifest
index 616a891acb5a..394defd4f8b9 100644
--- a/sys-apps/etckeeper/Manifest
+++ b/sys-apps/etckeeper/Manifest
@@ -1,2 +1,3 @@
DIST etckeeper-1.18.18.tar.gz 101845 BLAKE2B 2072b54db4023211e85fcbed82bd93412eb02707d5447b297bf98e65f1d534e02e790612d9771ae433a07aa6a462dd9b5c5528207d2bcfd4059232417e3186e1 SHA512 57b2f7297c0b71e3d39a7838dd3e6599bb3f1275d86200be9d7986f46f0392aa0ba130cb38ba7a5757fcb5d6fa33b4d32233237dba15e8ce9fb8c52565cf251b
DIST etckeeper-1.18.20.tar.gz 110787 BLAKE2B 8d69cd65a1cad7ff64eae95d70a3da70c60adfd2fa15ae34d45a394456ba362376a5fc93116841f25f907c71fb4df2af2e1d5ffe155e11c368f6862c53d39135 SHA512 b190da11ac589d6240c8293d961b75efe01e835091f9b5fba84c3c9062ffb4cb1dc52c9ea2bdf881f021c7d5584c4487d3c60121fdcb0a2a35e349c8321422c6
+DIST etckeeper-1.18.21.tar.gz 116961 BLAKE2B ad765ebc1e3b393a896b6491f21195a7c1081212f798b8586966adc72578c2bffe9adfb5a6004cba7ff87efb66f4318314dd3646e538d9bbe7a686250ea1f160 SHA512 c23bd0f24e04b565ceae77e552eb00926dae16f4a6c8c183c5a6bb404d5351ee7a040e01287b7c0d3d530bc8dea62cd2336b3151a349998aa9c145f1258ac2a0
diff --git a/sys-apps/etckeeper/etckeeper-1.18.21.ebuild b/sys-apps/etckeeper/etckeeper-1.18.21.ebuild
new file mode 100644
index 000000000000..d55624b11c95
--- /dev/null
+++ b/sys-apps/etckeeper/etckeeper-1.18.21.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2023 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 )"
+
+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}"@" \
+ -e '/etckeeper-bzr\/__init__\.py/d' \
+ Makefile || die
+
+ # pre-configure for portage.
+ sed -i \
+ -e 's/^HIGHLEVEL_PACKAGE_MANAGER=apt/HIGHLEVEL_PACKAGE_MANAGER=emerge/' \
+ -e 's/^LOWLEVEL_PACKAGE_MANAGER=dpkg/LOWLEVEL_PACKAGE_MANAGER=qlist/' \
+ etckeeper.conf || 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"
+}