commit:     a908c0b942f65d8be0f1d508a7aa31c6143fca2b
Author:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
AuthorDate: Sun May  1 16:22:11 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun May  1 16:22:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a908c0b9

app-admin/customrescuecd-x86_64: 0.12.7 version bump

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

 app-admin/customrescuecd-x86_64/Manifest           |  2 +-
 .../customrescuecd-x86_64-0.12.7.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 661a4b605..7e906b2df 100644
--- a/app-admin/customrescuecd-x86_64/Manifest
+++ b/app-admin/customrescuecd-x86_64/Manifest
@@ -1 +1 @@
-DIST CUSTOMRESCUECD-x86_64-0.12.6.iso 1613086720 BLAKE2B 
3f09ad7bae1f8847476d9b1ae58bfb3c463ff4131438bc3f0aa605146db93ebcc90b6164ef7cfc201ae8bba46ba61b6d578e55444c04c647c6d972d6dc211e85
 SHA512 
6cf6136070ebafdcb934949ad41294e8c6753723c6ea4be56283b5299f51ae27856a9daeff74c7a67991139e4eb9bd172b0ea9f0e4cec645e170e6a6516e2c9a
+DIST CUSTOMRESCUECD-x86_64-0.12.7.iso 1656078336 BLAKE2B 
d3d23f3cd3beae62c5e9053533372426dcaed7b3a655fced37c21fd14127445f49679f6bc9db706d403a37b86331a78c6ccddcf55199985600f0f90b50498682
 SHA512 
03f397c21979e488cce4a75f33eca5acb7ae4231887744ba9c0826d8f0340b84d908a343181ca3412c74ae7750f4b510d42f5ff198d44240a8dc302e924f0a26

diff --git 
a/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.7.ebuild 
b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.7.ebuild
new file mode 100644
index 000000000..97ae9bab2
--- /dev/null
+++ b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.12.7.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
+}

Reply via email to