Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: app-admin/customrescuecd-x86_64/
Date: Sat, 15 Aug 2020 18:15:15
Message-Id: 1597433069.2b3f9846ef74ac866097cba990d02f564f03f66e.andrewammerlaan@gentoo
1 commit: 2b3f9846ef74ac866097cba990d02f564f03f66e
2 Author: Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
3 AuthorDate: Fri Aug 14 19:24:29 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Fri Aug 14 19:24:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2b3f9846
7
8 app-admin/customrescuecd-x86_64 : initial ebuild
9
10 Signed-off-by: Andrea Postiglione <andrea.postiglione <AT> gmail.com>
11
12 app-admin/customrescuecd-x86_64/Manifest | 1 +
13 .../customrescuecd-x86_64-0.10.3.ebuild | 55 ++++++++++++++++++++++
14 app-admin/customrescuecd-x86_64/metadata.xml | 12 +++++
15 3 files changed, 68 insertions(+)
16
17 diff --git a/app-admin/customrescuecd-x86_64/Manifest b/app-admin/customrescuecd-x86_64/Manifest
18 new file mode 100644
19 index 0000000..3a08f60
20 --- /dev/null
21 +++ b/app-admin/customrescuecd-x86_64/Manifest
22 @@ -0,0 +1 @@
23 +DIST CUSTOMRESCUECD-x86_64-0.10.3.iso 1537474560 BLAKE2B d4812074013323d8372bd71bea1c81cbe8cb88e0cf87dd1ec7c4373a1c4f4023cfec383ea3327cb75aa903021d929ac7a29290a2a9a7a75857c591827af7a148 SHA512 1092dc85a82c1f17c362b19e91d36602debaab7d52a98945ebb494f9d8bec03fb07b16649c7401233a060ce95905c3f9259107c2eb9f80bd63d759740754105e
24
25 diff --git a/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.10.3.ebuild b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.10.3.ebuild
26 new file mode 100644
27 index 0000000..96d32df
28 --- /dev/null
29 +++ b/app-admin/customrescuecd-x86_64/customrescuecd-x86_64-0.10.3.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_64"
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="~amd64"
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_64/metadata.xml b/app-admin/customrescuecd-x86_64/metadata.xml
88 new file mode 100644
89 index 0000000..002f90c
90 --- /dev/null
91 +++ b/app-admin/customrescuecd-x86_64/metadata.xml
92 @@ -0,0 +1,12 @@
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 + <upstream>
102 + <remote-id type="sourceforge">customrescuecd</remote-id>
103 + </upstream>
104 +</pkgmetadata>