summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-01-19 23:06:06 +0100
committerMichał Górny <mgorny@gentoo.org>2016-01-19 23:06:38 +0100
commit455983af8995ac1a6ae7dc438a7db742969f31b6 (patch)
tree396f0bfd996543bfdd0ad5c1f183fbebfe49cc65 /app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild
parentsys-fs/genext2fs: Remove old (diff)
downloadgentoo-455983af8995ac1a6ae7dc438a7db742969f31b6.tar.gz
gentoo-455983af8995ac1a6ae7dc438a7db742969f31b6.tar.bz2
gentoo-455983af8995ac1a6ae7dc438a7db742969f31b6.zip
app-admin/systemrescuecd-x86: Bump to 4.7.0 & 4.7.1
Diffstat (limited to 'app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild')
-rw-r--r--app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild b/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild
new file mode 100644
index 000000000000..d7cc39e4ee14
--- /dev/null
+++ b/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.7.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The .iso image of SystemRescueCD rescue disk, x86 (+ amd64) variant"
+HOMEPAGE="http://www.sysresccd.org/"
+SRC_URI="mirror://sourceforge/systemrescuecd/sysresccd-${PN#*-}/${PV}/${P}.iso"
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}
+
+RESTRICT="mirror"
+
+src_install() {
+ insinto "/usr/share/${PN%-*}"
+ doins "${DISTDIR}/${P}.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 "${P}.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
+}