From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C2519138359 for ; Sat, 17 Oct 2020 18:16:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01A9BE0942; Sat, 17 Oct 2020 18:16:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DB2A9E0942 for ; Sat, 17 Oct 2020 18:16:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDF2833BE39 for ; Sat, 17 Oct 2020 18:16:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 35B6739F for ; Sat, 17 Oct 2020 18:16:00 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1602937170.e94937ef12b764eb9f378bfaf8e6fcc00f35cb4e.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: app-admin/customrescuecd-x86_64/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.11.0.ebuild X-VCS-Directories: app-admin/customrescuecd-x86_64/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: e94937ef12b764eb9f378bfaf8e6fcc00f35cb4e X-VCS-Branch: master Date: Sat, 17 Oct 2020 18:16:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 941dcd61-12ab-461c-ac69-1714de56f747 X-Archives-Hash: 175164d9074e074a23a34b36131d73f1 commit: e94937ef12b764eb9f378bfaf8e6fcc00f35cb4e Author: Andrea Postiglione gmail com> AuthorDate: Sat Oct 17 12:19:30 2020 +0000 Commit: Andrew Ammerlaan riseup 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 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 +}