Gentoo Archives: gentoo-commits

From: Andrea Postiglione <andrea.postiglione@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-admin/customrescuecd-x86/
Date: Fri, 14 Aug 2020 19:41:43
Message-Id: 1597434053.bc6b76c53ce768f2651581738ed6619b3b7f9e00.andrea_postiglione@gentoo
1 commit: bc6b76c53ce768f2651581738ed6619b3b7f9e00
2 Author: Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
3 AuthorDate: Fri Aug 14 19:40:53 2020 +0000
4 Commit: Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
5 CommitDate: Fri Aug 14 19:40:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bc6b76c5
7
8 app-admin/customrescuecd-x86: initial ebuild
9
10 Signed-off-by: Andrea Postiglione <andrea.postiglione <AT> gmail.com>
11
12 app-admin/customrescuecd-x86/Manifest | 1 +
13 .../customrescuecd-x86-0.3.1.ebuild | 55 ++++++++++++++++++++++
14 app-admin/customrescuecd-x86/metadata.xml | 19 ++++++++
15 3 files changed, 75 insertions(+)
16
17 diff --git a/app-admin/customrescuecd-x86/Manifest b/app-admin/customrescuecd-x86/Manifest
18 new file mode 100644
19 index 0000000..047efe1
20 --- /dev/null
21 +++ b/app-admin/customrescuecd-x86/Manifest
22 @@ -0,0 +1 @@
23 +DIST CUSTOMRESCUECD-x86-0.3.1.iso 1426063360 BLAKE2B 8116b657aed9f5fb9ac0d56f6284bc45a4e050ad7e84cd4cb7c5217b07c9151c82776589aefa3c030cf766106bca7948d48cde2055c408c4e32ea081297b6117 SHA512 3aa0d2ab54920a19046fc1038313e01a99287301b06f25b1346c54d680c4ca2395e9c9010b3299cdc94a0198ec0f63209d09a1d086243e3b82216e7f4d63e0e6
24
25 diff --git a/app-admin/customrescuecd-x86/customrescuecd-x86-0.3.1.ebuild b/app-admin/customrescuecd-x86/customrescuecd-x86-0.3.1.ebuild
26 new file mode 100644
27 index 0000000..4c3a5f6
28 --- /dev/null
29 +++ b/app-admin/customrescuecd-x86/customrescuecd-x86-0.3.1.ebuild
30 @@ -0,0 +1,55 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +MY_P="CUSTOMRESCUECD-x86"
37 +DESCRIPTION="A system rescue cd or usbstick for desktop and server based on gentoo"
38 +HOMEPAGE="https://sourceforge.net/projects/customrescuecd"
39 +SRC_URI="mirror://sourceforge/customrescuecd/"${MY_P}"-"${PV}".iso"
40 +
41 +LICENSE="GPL-3"
42 +SLOT="${PV}"
43 +KEYWORDS="~x86"
44 +RESTRICT="bindist mirror"
45 +
46 +S=${WORKDIR}
47 +
48 +src_unpack() { :; }
49 +
50 +src_install() {
51 + insinto "/usr/share/${PN%-*}"
52 + doins "${DISTDIR}/${MY_P}-${PV}.iso"
53 +}
54 +
55 +pkg_postinst() {
56 + local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
57 +
58 + # no version newer than ours? we're the newest!
59 + if ! has_version ">${CATEGORY}/${PF}"; then
60 + ln -f -s -v "${MY_P}-${PV}.iso" "${f}" || die
61 + fi
62 +}
63 +
64 +pkg_postrm() {
65 + local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
66 +
67 + # if there is no version newer than ours installed
68 + if ! has_version ">${CATEGORY}/${PF}"; then
69 + # and we are truly and completely uninstalled...
70 + if [[ ! ${REPLACED_BY_VERSION} ]]; then
71 + # then find an older version to set the symlink to
72 + local newest_version=$(best_version "<${CATEGORY}/${PF}")
73 +
74 + if [[ ${newest_version} ]]; then
75 + # update the symlink
76 + ln -f -s -v "${newest_version%-r*}.iso" "${f}" || die
77 + else
78 + # last version removed? clean up the symlink
79 + rm -v "${f}" || die
80 + # and the parent directory
81 + rmdir "${f%/*}" || die
82 + fi
83 + fi
84 + fi
85 +}
86
87 diff --git a/app-admin/customrescuecd-x86/metadata.xml b/app-admin/customrescuecd-x86/metadata.xml
88 new file mode 100644
89 index 0000000..47af661
90 --- /dev/null
91 +++ b/app-admin/customrescuecd-x86/metadata.xml
92 @@ -0,0 +1,19 @@
93 +<?xml version="1.0" encoding="UTF-8"?>
94 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
95 +<pkgmetadata>
96 + <maintainer type="person">
97 + <email>andrea.postiglione@×××××.com</email>
98 + <name>Andrea Postiglione</name>
99 + </maintainer>
100 + <stabilize-allarches/>
101 + <use>
102 + <flag name="isohybrid">
103 + Pass downloaded images through isohybrid in order to make it
104 + possible to copy them directly to USB media and boot (requires
105 + <pkg>sys-boot/syslinux</pkg> at build time).
106 + </flag>
107 + </use>
108 + <upstream>
109 + <remote-id type="sourceforge">customrescuecd</remote-id>
110 + </upstream>
111 +</pkgmetadata>