commit:     85fee8b7d0c144939bf969e58ca87c56706c2813
Author:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
AuthorDate: Mon Sep 27 16:32:30 2021 +0000
Commit:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
CommitDate: Mon Sep 27 16:32:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=85fee8b7

app-admin/customrescuecd-x86_64: version bump to 0.12.2

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

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

diff --git a/app-admin/customrescuecd-x86_64/Manifest 
b/app-admin/customrescuecd-x86_64/Manifest
index 31a1a18fd..3b699a7e3 100644
--- a/app-admin/customrescuecd-x86_64/Manifest
+++ b/app-admin/customrescuecd-x86_64/Manifest
@@ -1,2 +1,3 @@
 DIST CUSTOMRESCUECD-x86_64-0.12.0.iso 1409351680 BLAKE2B 
656cd518c0110ff2d84c12bf5db2973701dde6fd8c1b9d65e991f429719856c196223d49487c7b0bf89ec50081fcf97f47b6ad952d4958c3dc4ba423526fdd1d
 SHA512 
83dd17712c10a7db66a00fd89f94ada7bbc230badd67369e7c368bcffd1ec08838195f258280c63e70f8680072984a9dc6cebed6a4dd7dc95ff41171cc694609
 DIST CUSTOMRESCUECD-x86_64-0.12.1.iso 1467744256 BLAKE2B 
743f4f4a2dbeb545a201557b584a0ae3e2d04ec3a44c7cead90f954d8e2c53f3b7321f1765ffe123de7da0c0782ae9d3efa6a8360493099c66914ea00dc8553a
 SHA512 
f69d5acdfaf916207b8de07eb7e4b5695e29772a4afa40ae500233a1f812fd1bdf74f3a8a2b0d2387a2d7f1a9c7a99d8d9c5f5c22fbf3c1b5e0311d7550ea57c
+DIST CUSTOMRESCUECD-x86_64-0.12.2.iso 1516290048 BLAKE2B 
c9d2b857948c09a16b86bb9ccb7373f1908f52f97ed21c64ef422e6d7c3501278fd7871b34c035a70554b494926325d1be2978df729ffd93cb7f3bee6b0c5adc
 SHA512 
f215116878557ada9d321ba018970723a1e3905cbebf12aac5e1e65e97c9180f852fcfff5c2133c28e97bb3d1eb8fb80ca26bbf307de8b202fa39eb02a474abd

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