commit: e94937ef12b764eb9f378bfaf8e6fcc00f35cb4e Author: Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com> AuthorDate: Sat Oct 17 12:19:30 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Sat Oct 17 12:19:30 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e94937ef
app-admin/customrescuecd-x86_64: version bump to 0.11.0 Signed-off-by: Andrea Postiglione <andrea.postiglione <AT> gmail.com> .../customrescuecd-x86_64-0.11.0.ebuild | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.11.0.ebuild b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.11.0.ebuild new file mode 100644 index 00000000..96d32df6 --- /dev/null +++ b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.11.0.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2019 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 +}