summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-01-06 23:57:06 +0000
committerMichał Górny <mgorny@gentoo.org>2015-01-06 23:57:06 +0000
commitc9a415b751d3882579aaafd370ee244fc80df434 (patch)
tree4f384bdd6012ababb1ce01e8f4a4de6c05f5bcb8 /app-admin
parentversion bump (diff)
downloadgentoo-2-c9a415b751d3882579aaafd370ee244fc80df434.tar.gz
gentoo-2-c9a415b751d3882579aaafd370ee244fc80df434.tar.bz2
gentoo-2-c9a415b751d3882579aaafd370ee244fc80df434.zip
Introduce an ebuild to maintain a fresh copy of systemrescuecd-x86.
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/systemrescuecd-x86/ChangeLog9
-rw-r--r--app-admin/systemrescuecd-x86/metadata.xml8
-rw-r--r--app-admin/systemrescuecd-x86/systemrescuecd-x86-4.4.1.ebuild47
3 files changed, 64 insertions, 0 deletions
diff --git a/app-admin/systemrescuecd-x86/ChangeLog b/app-admin/systemrescuecd-x86/ChangeLog
new file mode 100644
index 000000000000..a51608379b79
--- /dev/null
+++ b/app-admin/systemrescuecd-x86/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-admin/systemrescuecd-x86
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/systemrescuecd-x86/ChangeLog,v 1.1 2015/01/06 23:57:06 mgorny Exp $
+
+*systemrescuecd-x86-4.4.1 (06 Jan 2015)
+
+ 06 Jan 2015; Michał Górny <mgorny@gentoo.org> +metadata.xml,
+ +systemrescuecd-x86-4.4.1.ebuild:
+ Introduce an ebuild to maintain a fresh copy of systemrescuecd-x86.
diff --git a/app-admin/systemrescuecd-x86/metadata.xml b/app-admin/systemrescuecd-x86/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/app-admin/systemrescuecd-x86/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.4.1.ebuild b/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.4.1.ebuild
new file mode 100644
index 000000000000..72117871bd54
--- /dev/null
+++ b/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.4.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/systemrescuecd-x86/systemrescuecd-x86-4.4.1.ebuild,v 1.1 2015/01/06 23:57:06 mgorny Exp $
+
+EAPI=5
+
+DESCRIPTION="The .iso image of SystemRescueCD rescue disk, x86 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 newer version? we're the newest!
+ if ! has_version ">${CATEGORY}/${PF}"; then
+ ln -f -s -v "${P}.iso" "${f}" || die
+ fi
+}
+
+pkg_postrm() {
+ # TODO: best_version is probably broken in portage, figure it out
+ local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
+ local newest_version=$(best_version "${CATEGORY}/${PN}")
+
+ if [[ ${newest_version} != ${CATEGORY}/${PF} ]]; then
+ # we're not the newest? update the symlink.
+ ln -f -s -v "${newest_version%-r*}.iso" "${f}" || die
+ elif [[ ! ${newest_version} ]]; then
+ # last version removed? clean up the symlink.
+ rm -v "${f}" || die
+ # TODO: remove the empty directory
+ fi
+}