From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1373544-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id F3FFE15808B
	for <garchives@archives.gentoo.org>; Tue,  8 Mar 2022 19:10:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0AD0AE0829;
	Tue,  8 Mar 2022 19:10:07 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9CE83E0829
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Mar 2022 19:10:06 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A181A340FF3
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Mar 2022 19:10:04 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id DAC86250
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Mar 2022 19:10:01 +0000 (UTC)
From: "Andrea Postiglione" <andrea.postiglione@gmail.com>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andrea Postiglione" <andrea.postiglione@gmail.com>
Message-ID: <1646766566.9d9dff76d208f81126995381ed3455ae80dbabb5.andrea_postiglione@gentoo>
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-admin/customrescuecd-x86_64/
X-VCS-Repository: repo/proj/guru
X-VCS-Files: app-admin/customrescuecd-x86_64/Manifest app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.6.ebuild
X-VCS-Directories: app-admin/customrescuecd-x86_64/
X-VCS-Committer: andrea_postiglione
X-VCS-Committer-Name: Andrea Postiglione
X-VCS-Revision: 9d9dff76d208f81126995381ed3455ae80dbabb5
X-VCS-Branch: dev
Date: Tue,  8 Mar 2022 19:10:01 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 489c3ead-9688-480b-916a-784e915d5b90
X-Archives-Hash: 22ac9032ac5ea6f9e19cd6d779acadfb

commit:     9d9dff76d208f81126995381ed3455ae80dbabb5
Author:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
AuthorDate: Tue Mar  8 19:09:26 2022 +0000
Commit:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
CommitDate: Tue Mar  8 19:09:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9d9dff76

app-admin/customrescuecd-0.12.6: version bump

Signed-off-by: Andrea Postiglione <andrea.postiglione <AT> gmail.com>

 app-admin/customrescuecd-x86_64/Manifest           |  2 +-
 .../customrescuecd-x86_64-0.12.6.ebuild            | 55 ++++++++++++++++++++++
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/app-admin/customrescuecd-x86_64/Manifest b/app-admin/customrescuecd-x86_64/Manifest
index 4a298abf9..661a4b605 100644
--- a/app-admin/customrescuecd-x86_64/Manifest
+++ b/app-admin/customrescuecd-x86_64/Manifest
@@ -1 +1 @@
-DIST CUSTOMRESCUECD-x86_64-0.12.5.iso 1610612736 BLAKE2B 6acba5a50e4693308a3653d0fa0eef8abe3a62f180d6712a4306626f625f022ddfcfaf160ecdacfe35554df5b730f3477dfe5ab6af5930af7e988a7df5e397db SHA512 2b9e43f1b375db5cce9684489710e289c64bc2967cfd92d8d4bdace9b803b6f0d73732b3e80cfa3060ee2ac072ecb2d3bd5dbfc2bf10fc1acbdb4129d8a44d7f
+DIST CUSTOMRESCUECD-x86_64-0.12.6.iso 1613086720 BLAKE2B 3f09ad7bae1f8847476d9b1ae58bfb3c463ff4131438bc3f0aa605146db93ebcc90b6164ef7cfc201ae8bba46ba61b6d578e55444c04c647c6d972d6dc211e85 SHA512 6cf6136070ebafdcb934949ad41294e8c6753723c6ea4be56283b5299f51ae27856a9daeff74c7a67991139e4eb9bd172b0ea9f0e4cec645e170e6a6516e2c9a

diff --git a/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.6.ebuild b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.6.ebuild
new file mode 100644
index 000000000..d57a8059d
--- /dev/null
+++ b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="CUSTOMRESCUECD-x86_64"
+DESCRIPTION="A system rescue cd or usbstick for desktop and server based on gentoo"
+HOMEPAGE="https://sourceforge.net/projects/customrescuecd"
+SRC_URI="mirror://sourceforge/customrescuecd/"${MY_P}"-"${PV}".iso"
+
+LICENSE="GPL-3"
+SLOT="${PV}"
+KEYWORDS="~amd64"
+RESTRICT="bindist mirror"
+
+S=${WORKDIR}
+
+src_unpack() { :; }
+
+src_install() {
+	insinto "/usr/share/${PN%-*}"
+	doins "${DISTDIR}/${MY_P}-${PV}.iso"
+}
+
+pkg_postinst() {
+	local f=${EROOT}/usr/share/${PN%-*}/${PN}-newest.iso
+
+	# no version newer than ours? we're the newest!
+	if ! has_version ">${CATEGORY}/${PF}"; then
+		ln -f -s -v "${MY_P}-${PV}.iso" "${f}" || die
+	fi
+}
+
+pkg_postrm() {
+	local f=${EROOT}/usr/share/${PN%-*}/${PN}-newest.iso
+
+	# if there is no version newer than ours installed
+	if ! has_version ">${CATEGORY}/${PF}"; then
+		# and we are truly and completely uninstalled...
+		if [[ ! ${REPLACED_BY_VERSION} ]]; then
+			# then find an older version to set the symlink to
+			local newest_version=$(best_version "<${CATEGORY}/${PF}")
+
+			if [[ ${newest_version} ]]; then
+				# update the symlink
+				ln -f -s -v "${newest_version%-r*}.iso" "${f}" || die
+			else
+				# last version removed? clean up the symlink
+				rm -v "${f}" || die
+				# and the parent directory
+				rmdir "${f%/*}" || die
+			fi
+		fi
+	fi
+}